Created
January 18, 2016 21:04
-
-
Save romainl/17437ae3ed71ce9fbc0b to your computer and use it in GitHub Desktop.
Edit all buffers and come back without losing highlighting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! EditAllBuffersAndComeBackWithoutLosingHighlighting() | |
let this_buffer = bufnr("%") | |
bufdo set eventignore= | if &buftype != "nofile" && expand("%") != '' | edit | endif | |
execute "b" . this_buffer | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment