New answers tagged folding
0
votes
Which setting prevents folds from automatically folding on save?
I have experienced the same behavior with RestructuredText (rst) files with the RIV vim plugin.
RIV adds an au! BufWritePost <buffer> call riv#fold#update() that collapse all folds when a file ...
- 1
1
vote
How to fold away C++ system headers in quickfix window?
Combining both answers, I put the following into ~/after/ftplugin/qf.vim:
function! FoldError(lnum)
let l:line = getline(a:lnum)
if matchstr(l:line, '^/') != ''
return 1
endif
if matchstr(...
- 133
1
vote
Accepted
How to fold away C++ system headers in quickfix window?
For the first example if you define the following function (e.g. .vimrc)
function! FoldError(lnum)
let l:line = getline(a:lnum)
if matchstr(l:line, ' ^|| In file included') != ''
return '>1'...
- 6,050
2
votes
How to fold away C++ system headers in quickfix window?
cnext does not respect folds and you can't make it to.
The procedure of creating folds is rather a standard one:
Create ftplugin file for your filetype, i.e. ~/after/ftplugin/qf.vim
Set local ...
- 19.2k
Top 50 recent answers are included
Related Tags
folding × 233vimrc × 24
syntax-highlighting × 20
vimscript × 15
neovim × 10
key-bindings × 9
autocmd × 8
highlight × 8
comments × 7
filetype-markdown × 7
filetype × 6
foldtext × 6
indentation × 5
search × 4
cut-copy-paste × 4
functions × 4
filetype-tex × 4
regular-expression × 3
gvim × 3
cursor-movement × 3
insert-mode × 3
visual-mode × 3
cursor-motions × 3
filetype-c++ × 3
filetype-html × 3