2023年11月16日

VIM 一些小設定記錄

●使用F5快速存檔和執行
nmap  :call CompileRun()
func! CompileRun()
        exec "w"
if &filetype == 'python'
            exec "!time python3 %"
elseif &filetype == 'java'
            exec "!javac %"
            exec "!time java %<"
elseif &filetype == 'sh'
            :!time bash %
endif
    endfunc
●把 Tab 轉換為 4 個空格
syntax enable
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab

0 意見:

張貼留言