Skip to content

Commit 063f79d

Browse files
committed
tidy init.vim
1 parent a7fa80a commit 063f79d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

nvim/init.vim

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" nvim file: ~/.config/nvim/init.vim
2-
" Last Change: 2018 abr 01 16:46
2+
" Last Change: 2018 abr 01 19:25
33
" vim: ff=unix ai et ts=4
44
" Author: Sérgio Luiz Araújo Silva
55
" Reference: http://sergioaraujo.pbworks.com/w/page/15864094/vimrc
@@ -329,16 +329,6 @@ nnoremap <F2> :NERDTreeToggle<cr>
329329
" vnoremap <Leader>t :Commentary<cr>
330330
" comment a paragraph → gcap
331331

332-
" these lines are needed for ToggleComment()
333-
" Reference: https://stackoverflow.com/a/24652257/2571881
334-
autocmd FileType c,cpp,java let b:comment_leader = '//'
335-
autocmd FileType arduino let b:comment_leader = '//'
336-
autocmd FileType sh,ruby,python let b:comment_leader = '#'
337-
autocmd FileType zsh let b:comment_leader = '#'
338-
autocmd FileType conf,fstab let b:comment_leader = '#'
339-
autocmd FileType matlab,tex let b:comment_leader = '%'
340-
autocmd FileType vim let b:comment_leader = '"'
341-
342332
" Emacs like Ctrl-l - jumpt to Middle, Bottom and Top of the window
343333
" Reference: http://vim.1045645.n5.nabble.com/Vim-General-f1139531.html
344334
function! ToggleHML()
@@ -357,6 +347,16 @@ function! ToggleHML()
357347
endfunction
358348
nnoremap <C-l> :call ToggleHML()<CR>
359349
350+
" these lines are needed for ToggleComment()
351+
" Reference: https://stackoverflow.com/a/24652257/2571881
352+
autocmd FileType c,cpp,java let b:comment_leader = '//'
353+
autocmd FileType arduino let b:comment_leader = '//'
354+
autocmd FileType sh,ruby,python let b:comment_leader = '#'
355+
autocmd FileType zsh let b:comment_leader = '#'
356+
autocmd FileType conf,fstab let b:comment_leader = '#'
357+
autocmd FileType matlab,tex let b:comment_leader = '%'
358+
autocmd FileType vim let b:comment_leader = '"'
359+
360360
function! ToggleComment()
361361
if exists('b:comment_leader')
362362
let l:pos = col('.')
@@ -379,7 +379,6 @@ inoremap <Leader>t <C-o>:call ToggleComment()<CR>
379379
xnoremap <Leader>t :'<,'>call ToggleComment()<CR>
380380
" vnoremap <Leader>t :call ToggleComment()<CR>
381381

382-
383382
" source: https://github.com/junegunn/vim-plug/issues/164
384383
"command! Gstatus call LazyLoadFugitive('Gstatus')
385384
"command! Gdiff call LazyLoadFugitive('Gdiff')
@@ -392,7 +391,6 @@ xnoremap <Leader>t :'<,'>call ToggleComment()<CR>
392391
" exe a:cmd
393392
"endfunction
394393

395-
396394
" lion it is an align plugin glip=
397395
let b:lion_squeeze_spaces = 1
398396

0 commit comments

Comments
 (0)