New answers tagged

-1

I just had tried to use /\<*> to search literally * sign in vim, obviously it also counted space in the list. here is the possible way to do it in a Very Nomagic way, /\v* for for more detail :help \V


0

I removed all plugins, then added and tested, finally found these plugins were the cause of slowness of opening html files: 'hail2u/vim-css3-syntax' 'mhinz/vim-signify'


1

Since I don't use pathogen I don't know if you can modify its behavior, but I would assume you can. Check its documentation. Alternatively, you can possibly override pathogen and other plugins--assuming they aren't setting options on autocmd events--by putting your settings in something like ~/.vim/after/plugin/overrides.vim. See: :help 'runtimepath' ...


0

tl;dr: set tabstop=4 softtabstop=-1 shiftwidth=0 expandtab short form: set ts=4 sts=-1 sw=0 et Explanation If you set softtabstop (or sts) to -1 it will automatically behave the same as tabstop (ts), which will save you some hassle if you change tabbing a lot. Setting shiftwidth (sw) to 0 should effectively make that the same as tabstop as well. In ...


0

brew link perl or brew link --overwrite perl before installing or linking the app should also work and it's probably the root cause of the issue. Also it's way more clean and less risky that playing with symlinks over different versions


0

From your comments I strongly suspect that F-5 is a mapped key, so you're using nnoremap to try to map a key to another mapped key. The :nore versions of the various map commands tell Vim explicitly not to trigger a second mapped key sequence to the right-hand-side (rhs) of the mapping. In other words, the solution is to use :nmap instead of :nnoremap, and ...


1

there is no argexpr command. However you can do it like this: :argadd `some-command` which runs some-command and adds the result to the argument list.


0

You can do it this way: function! s:MoveAndCenter(motion) return a:motion . (v:count > 1 ? 'zz' : '') endfunction noremap <silent> <expr> j <sid>MoveAndCenter('j') noremap <silent> <expr> k <sid>MoveAndCenter('k') This tells Vim to run an expression every time j or k are pressed, and use the returned string from ...


0

You could try these mappings, taken from :help tsch-style: :cnoremap <C-A> <Home> :cnoremap <C-F> <Right> :cnoremap <C-B> <Left>


0

I tried all the suggestions here and the editor did not change to VIM. Although the selections were made correctly and the files were updated correctly, the editor continued to be Nano. sudo update-alternatives --config editor Edit the file ~/.selected_editor Finally I deleted the file ~/.selected_editor and executed \ef once again. Because the ....


3

The problem you are experiencing is that in all RedHat distributions and their derivatives--including CentOS--/bin/vi is the "tiny"/"small" version of Vim which has very limited functionality. It lacks the ability to do any sort of evaluation, set a number of options, do syntax highlighting, and so on. Your vimrc is being read, but a significant portion of ...


0

Did you put your language settings at the beginning of the vimrc? I have encountered once when I put the lang English after some default settings like source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim The display of gVim will still be Chinese.


0

For future visitors, the mistake I made relates to the following config option: let g:syntastic_python_pyflakes_exe = 'python3 -m pyflakes' When debugging the checker, the command I should therefore have run in vim was: :echo system('python3 -m pyflakes test.py') Which told me that pyflakes was not available for python3...


5

Actually, it turned out to be quite simple. I followed the suggestion to run brew doctor and I got these results: Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: ruby So I ran brew link ruby. This is ...


0

The vi command is running vim in compatible mode. Try disabling it by adding this to your .vimrc: set nocompatible or running this command: :set nocompatible More info: What is compatible mode in Vim?


0

As I am on a Mac and not using MacVim (but plain vim within a terminal) I have had some difficulty with key combinations not being sent through to the terminal. The most-compatible (and for me most comfortable) way to switch tabs quickly comes from the Vim Wikia site. Place in your .vimrc file: nnoremap H gT nnoremap L gt Now Shift-h (capital H) and ...


0

I fixed the backspace problem I had with ConEmu in the terminal vim (backspace registered as delete) by adding the following lines to my .vimrc file (or _vimrc): inoremap <Char-0x07F> <BS> nnoremap <Char-0x07F> <BS> See https://github.com/Maximus5/ConEmu/issues/641.


0

I believe you can do this in your $HOME/.vimrc to achieve what you want: if has("gui_running") set fuoptions=maxvert,maxhorz au GUIEnter * set fullscreen endif You can confirm where the fullscreen is being applied like so: :verbose set nofullscreen? fullscreen Last set from ~/.vim_runtime/my_configs.vim


1

My two cents, I run this whenever upgraded my python via homebrew. brew reinstall vim --HEAD --with-cscope --with-lua --override-system-vim brew reinstall macvim --HEAD --with-cscope --with-lua --override-system-vim


2

Ctrlu will scroll up half a page. Ctrld will scroll down half a page. You may change this behaviour by setting scroll to the number of lines you wish these commands to scroll. For example: Esc:set scroll=1Enter Or, in your ~/.vimrc file: set scroll=1


0

Here are links to scripts that use fzf to fuzzy search and select a pane: https://github.com/junegunn/fzf/wiki/Examples-(tmux)#select-pane https://github.com/junegunn/fzf/wiki/Examples#tmux I guess it won't be too hard to adjust those for fuzzy searching windows. EDIT: Change this line: panes=$(tmux list-panes -s -F '#I:#P - #{pane_current_path} #{...


0

Figured it out. In /etc/vimrc under the "syntax on" line add: hi Search ctermbg=red hi Search ctermfg=white This example will give you a red block with white text while searching files with VIM. Inside VIM you can also do: :highlight Search ctermfg=yellow To change it on the fly.


1

All syntax colors, including the search highlight color, are set by changing a highlight group rather than an option. You set these groups with the :highlight command. For example I have changed search highlighting from yellow a bright turquoise: :highlight Search guibg=Turquoise4 I have also changed the IncSearch color, which is the color when '...


0

Adding values explicitly, to the next 2 variables in .vimrc (vim config) solved the problem for me: let g:NERDTreeDirArrowExpandable = '▸' let g:NERDTreeDirArrowCollapsible = '▾' These should be default values but for some reason they were not set for me on ubuntu/vim.


0

There is EditorConfig. It allows specifying text file specific config options such as line endings or indentation in a standardized way. There are plugins for both Vim and Eclipse.



Top 50 recent answers are included