New answers tagged

0

You can hide the last colon command or search pattern from the bottom of the screen by typing : or / and then Backspace (or Delete on macOS) or Esc (or Ctrl[).


0

Marin Tournoij's answer didn't work for me as written; entering a command was overriding echo ''. It gave me an idea though. The code below is the same approach, but on a slight delay. (Also, his command had a colon : in it, but I think that's supposed to be an asterisk * to signify the autocmd works on any file pattern.) augroup clearcmdline autocmd! ...


1

The highlight group for the default ruler is Normal. If you just want to adjust the opacity for everything, this might work. In vim there is not a built-in way to adjust the standard ruler's colors independently from the regular buffer text. In neovim, there is MsgArea, although that covers more than just the ruler. One workaround is to use your own ruler ...


0

FWIW, this issue is still open on github, but there are now at least a couple plugins that should restore this functionality: vim-sanegx (works well for me) open-browser.vim (I haven't tested) vim-better-gx (gist via @maxim-kim)


1

I have found that mapping ESC in /home/.vimrc will open vim with replace command. Instead, I did the exact mapping but in /etc/vim/vimrc file and the mapping is executed successfully without the popping of replace command at startup.


2

:h nvim_win_get_cursor() will return a tuple containing the current cursor position, which you'll have to unpack to use. It takes an argument {window}, and you can use 0 to specify the current window. :h nvim_get_current_line() is the Neovim Lua analog to getline('.'). Here is an example: function check_back_space() -- get row and column local row, ...


0

This is (roughly) how I would write this with your skeleton: we add an autocommand to do the initial mapping on any buffer enter. If you want it for particular files, change the autocommmand's pattern. If you want it for particular filetypes, you're better off putting the call MapRunCmd() in ~/.vim/after/ftplugin/{filetype}.vim. function! MapRunCmd() abort ...


0

I added the following lines to my .vimrc for this: " Disable Coc suggestions by default, use manual trigger. autocmd BufEnter * let b:coc_suggest_disable = 1 " Use <c-space> to trigger completion. if has('nvim') inoremap <silent><expr> <c-space> coc#refresh() else inoremap <silent><expr> <c-@> coc#...


0

I had this just recently and my solution was different. My vim setup was: :set --- Options --- background=dark history=200 langnoremap nomodeline ruler scrolloff=5 ttimeout ttyfast wildmenu display=truncate incsearch nolangremap nrformats=bin,hex scroll=37 ...


Top 50 recent answers are included