diff options
| author | jdhao <jdhao@hotmail.com> | 2020-09-26 09:15:40 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2020-09-26 09:15:40 +0800 |
| commit | b65c7c6d702ba0371e917066b55a58cf14f2d1bb (patch) | |
| tree | 801a9cab3e33120ee8a7781c1ccb28522b59b269 /after | |
| parent | c248ab02d40249479ca5c0f75ae580e5f2074239 (diff) | |
change vim script style from 4-space indent to 2-space
Diffstat (limited to 'after')
| -rw-r--r-- | after/ftplugin/markdown.vim | 4 | ||||
| -rw-r--r-- | after/ftplugin/python.vim | 2 | ||||
| -rw-r--r-- | after/ftplugin/tex.vim | 4 | ||||
| -rw-r--r-- | after/ftplugin/vim.vim | 13 |
4 files changed, 14 insertions, 9 deletions
diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index f640660..f9da4f2 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -2,6 +2,6 @@ set concealcursor=c set synmaxcol=3000 " For long Chinese paragraphs if exists(':FootnoteNumber') - nnoremap <buffer> <Plug>AddVimFootnote :<c-u>call markdownfootnotes#VimFootnotes('i')<CR> - inoremap <buffer> <Plug>AddVimFootnote <C-O>:<c-u>call markdownfootnotes#VimFootnotes('i')<CR> + nnoremap <buffer> <Plug>AddVimFootnote :<c-u>call markdownfootnotes#VimFootnotes('i')<CR> + inoremap <buffer> <Plug>AddVimFootnote <C-O>:<c-u>call markdownfootnotes#VimFootnotes('i')<CR> endif diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim index f842275..0caca7d 100644 --- a/after/ftplugin/python.vim +++ b/after/ftplugin/python.vim @@ -1,5 +1,5 @@ if exists(':AsyncRun') - nnoremap <silent> <F9> :AsyncRun python -u "%"<CR> + nnoremap <silent> <F9> :AsyncRun python -u "%"<CR> endif " Do not wrap Python source code. diff --git a/after/ftplugin/tex.vim b/after/ftplugin/tex.vim index 6e6a7ca..7de12d3 100644 --- a/after/ftplugin/tex.vim +++ b/after/ftplugin/tex.vim @@ -1,6 +1,6 @@ " Only use the following character pairs for tex file if &runtimepath =~? 'auto-pairs' - let b:AutoPairs = AutoPairsDefine({'<' : '>'}) - let b:AutoPairs = {'(':')', '[':']', '{':'}', '<':'>'} + let b:AutoPairs = AutoPairsDefine({'<' : '>'}) + let b:AutoPairs = {'(':')', '[':']', '{':'}', '<':'>'} endif set textwidth=79 diff --git a/after/ftplugin/vim.vim b/after/ftplugin/vim.vim index efea738..4f92851 100644 --- a/after/ftplugin/vim.vim +++ b/after/ftplugin/vim.vim @@ -9,16 +9,21 @@ set formatoptions-=r " focus is lost (see " https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14) set foldmethod=expr foldlevel=0 foldlevelstart=-1 - \ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText() + \ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText() " Use :help command for keyword when pressing `K` in vim file, " see `:h K` and https://stackoverflow.com/q/15867323/6064933 set keywordprg=:help +set tabstop=2 " number of visual spaces per TAB +set softtabstop=2 " number of spaces in tab when editing +set shiftwidth=2 " number of spaces to use for autoindent +set expandtab " expand tab to spaces so that tabs are spaces + " Only define following variable if Auto-pairs plugin is used if &runtimepath =~? 'auto-pairs' - let b:AutoPairs = AutoPairsDefine({'<' : '>'}) + let b:AutoPairs = AutoPairsDefine({'<' : '>'}) - " Do not use `"` for vim script since `"` is also used for comment - let b:AutoPairs = {'(':')', '[':']', '{':'}', "'":"'", '`':'`', '<':'>'} + " Do not use `"` for vim script since `"` is also used for comment + let b:AutoPairs = {'(':')', '[':']', '{':'}', "'":"'", '`':'`', '<':'>'} endif |
