New answers tagged

0

:set cursorbind! works. Now the issue is that this option is local to the window and needs to be done into several windows in order to see any result. Moreover, it binds line numbers and not cursor positions. A mapping could be nnoremap <silent> <leader>whatever :<c-u>set cursorbind!<cr>:set cursorbind?<cr>


0

You can use a function for it: function! ToggleCursorbind() if &cursorbind == 1 set nocursorbind else set cursorbind endif endfunc And then make a mapping using your function: nnoremap <leader>c :call ToggleCursorbind()<CR>


1

If we just limit to 1 aspect and we map it (instead of all user changes as question asks, and for vimscript instead of map), we can save-set-doStuff-reset easily: let str_zzz="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eget libero quis mi gravida sollicitudin sit amet in sem." nnoremap <buffer> <leader>zzz \ :...


1

The difference is whether changing the global option will affect existing buffers other than the current one. With a regular buffer-local option, the local option is set to match the global option when the buffer is created. When you use a :set command, it sets both the global and the buffer-local option (for the current buffer) to the same value. But since ...


Top 50 recent answers are included