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
344334function ! ToggleHML ()
@@ -357,6 +347,16 @@ function! ToggleHML()
357347endfunction
358348nnoremap <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+
360360function ! ToggleComment ()
361361 if exists (' b:comment_leader' )
362362 let l: pos = col (' .' )
@@ -379,7 +379,6 @@ inoremap <Leader>t <C-o>:call ToggleComment()<CR>
379379xnoremap <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=
397395let b: lion_squeeze_spaces = 1
398396
0 commit comments