3 ms·
They're fold markers. When I open my vimrc in Vim it looks like this: http://d.pr/YKCM http://d.pr/YKCM
by stevelosh 15y ago
They're fold markers. When I open my vimrc in Vim it looks like this: http://d.pr/YKCM http://d.pr/YKCM
- shortlived 15y agoWhy doesn't my Vim fold things automatically? What options am I missing?
- nickknw 15y agoEither set foldmethod=marker Or put this modeline at the top of your .vimrc: " vim: foldmethod=marker foldlevel=0
- stevelosh 15y ago`foldmethod` and friends. There are a bunch of different methods for folding (indentation, manual markers, custom syntax-based folding, etc), and which one you want usually depends on the file type. I have a bunch of autocommands for different files that set the foldmethod appropriately. For example: augroup ft_vim au! au FileType vim setlocal foldmethod=marker foldmarker={{{,}}} augroup END augroup ft_js au! au FileType javascript setlocal foldmethod=marker foldmarker={,} augroup END This makes Vim fold using markers for Vim and Javascript files. The Vim markers are the usual {{{ and }}}, but Javascript has it's own "built-in" markers we can take advantage of, so it uses { and }.