vimrc: fix indent

This commit is contained in:
Mathieu Maret 2018-07-11 17:33:17 +02:00
parent de271744bc
commit f4e3bce321
1 changed files with 34 additions and 32 deletions

66
.vimrc
View File

@ -40,12 +40,12 @@ set nocompatible
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
" Revert with ":syntax off".
syntax on
" Revert with ":syntax off".
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
endif
filetype plugin on
@ -62,15 +62,15 @@ set autowrite
" Put these in an autocmd group, so that you can revert them with:
" ":augroup vimStartup | au! | augroup END"
augroup vimStartup
au!
au!
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
@ -307,7 +307,7 @@ if bufwinnr(1)
endif
" open automatically quickfix window
if has("autocmd")
autocmd QuickFixCmdPost * cw
autocmd QuickFixCmdPost * cw
endif
" open a file in the same directory as the current file with F2 and split with shift+F2
@ -325,11 +325,11 @@ imap <S-F1> <Esc><S-F1>
" show contextual help with F1
function Help()
try
if exists('b:current_syntax') && b:current_syntax == "python"
:call ShowPyDoc(expand("<cword>"), 1)
else
execute "Man " . expand("<cword>")
endif
if exists('b:current_syntax') && b:current_syntax == "python"
:call ShowPyDoc(expand("<cword>"), 1)
else
execute "Man " . expand("<cword>")
endif
catch /:E149:/
execute "help " . expand("<cword>")
endtry
@ -353,7 +353,7 @@ imap <M-F10> <ESC><M-F10>a
" show git diff when committing
let g:git_diff_spawn_mode = 1
if has("autocmd")
autocmd BufRead,BufNewFile COMMIT_EDITMSG setf git
autocmd BufRead,BufNewFile COMMIT_EDITMSG setf git
endif
" zf#j creates a fold from the cursor down # lines.
@ -412,6 +412,8 @@ else
colorscheme mycolor
endif
cnoremap sudow w !sudo tee % >/dev/null
" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
"""""""""""
" NerdTree
@ -436,11 +438,11 @@ nnoremap <silent> <leader>k :SetLinuxFormatting<cr><cr>
""""""""""
if filereadable(expand('~/.vimrc.local'))
" Plugins list and settings should be loaded
" only once. Load local_settings block
let g:local_plugins = 0
let g:local_settings = 1
source ~/.vimrc.local
" Plugins list and settings should be loaded
" only once. Load local_settings block
let g:local_plugins = 0
let g:local_settings = 1
source ~/.vimrc.local
endif
""""""""""
@ -460,13 +462,13 @@ nnoremap <silent> <leader>a :LinuxCodingStyle<cr>
"Or start vim with -V[VERBOSENUMBER][FILE]
function! ToggleVerbose()
if !&verbose
set verbosefile=~/.log/vim/verbose.log
set verbose=15
else
set verbose=0
set verbosefile=
endif
if !&verbose
set verbosefile=~/.log/vim/verbose.log
set verbose=15
else
set verbose=0
set verbosefile=
endif
endfunction
"""""""""