Hot answers tagged

4

Yes. For a local buffer/window option, you can use: let &l:option = 'complex value' And you can also be explicit about a global option, with: let &g:option = 'complex value' See :help :let-option, which includes: :let &l:{option-name} = {expr1} Like above, but only set the local value of an option (if there is one). Works like :setlocal. ...


4

Sorry, but I very quickly answered my own question, hadn't read far enough down in the docs! let &l:option='value' will set the local value, with let &g:option='value' explicitly setting the global value.


3

The browsefilter variable is a convenient way to add custom glob like filters for the graphical :browse dialog and select only the relevant filetypes for display. As you discovered, those are usually set in the filetype plugins. If you want to customize those filters, create a file in ~/.vim/after/ftplugin/<filetype>.vim (replace <filetype> by ...


3

1. Try to replicate issue with clean vim vim --clean :set keymap=russian-jcukenmac If you are able to enter letter ю, something is wrong with your vimrc 2. Check what is in your keymap file Open :e $VIMRUNTIME/keymap/russian-jcukenmac.vim and find letter ю. Make sure it is correctly mapped: . ю CYRILLIC SMALL LETTER YU


2

TL;DR relative numbers are just another tool in the toolbox they can be effective in terms of locality when a text-object doesn't cut it (and for the lazy-minded among us) they pair nicely with commands that take ranges but they aren't the "be-all/end-all" of navigating and editing text One thing to keep in mind is that G/gg/Ctrl-o and '...


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 ...


1

This is the first buffer only. While vimrc is being sourced the buffer #1 already exists (but unloaded), and so it has its local option values (default ones). Now when you setglobal tabstop you don't change it, so it's still eight.


1

If you're using something like <Ctrl-V> or <Cmd-v> or equivalent you're doing it wrong. Doing that, the text is pasted into the vim buffer, as if you were typing it. That can have a lot of delay because of several vim options such as autoindent, etc. Typically you can use either "+p or "+]p (this pastes keeping current indent level in mind) to ...


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 \ :...


Only top voted, non community-wiki answers of a minimum length are eligible