Hot answers tagged

3

A brief word on how vim-plug works... The main part of a plugin config is a path on GitHub. In your case dracula/vim refers to https://github.com/dracula/vim. What vim-plug needs to do, then, is download/install (using git) the plugin code from that address. But it doesn't happen automatically. It's up to you to run the command :PlugInstall. (And do so each ...


3

You can't change colorscheme for a single window in vim (and probably in neovim too). But if you speak about different colors of regular neovim windows and built-in terminals, you can play around g:terminal_color_0..15. Usually modern colorschemes use them to set terminal colors to match colorscheme, e.g.: let g:terminal_color_0 = '#1c1c1c' let g:...


3

What a coincidence. I encountered this exact same thing a few hours before you posted this. I just figured it was a line-ending issue and solved it by wrapping the system() call in a call to trim(). Since you mentioned it I since verified that the cause is the presence of a newline in the output of system(). So you can solve this with a trim() call that ...


3

The .. string concatenation operator was added to Vim fairly recently, as of version 8.1.1114 from April 2019. The documentation at :help expr-.. explains the rationale for adding it: For String concatenation .. is preferred, since . is ambiguous, it is also used for Dict member access and floating point numbers. This commit has been ported to NeoVim in ...


2

What you're seeing is the newline at the end of the command, as @BLayer's answer states. A better approach for this specific case of finding a binary would be to use the Vimscript function exepath() here instead of shelling out to the which command: let g:coc_node_path = exepath('node') This is more efficient (since it doesn't need to spawn an external ...


2

:help / should get you to :help pattern, from which you can learn all about vim’s syntax for patterns. Since they can used in more places than just /, it’s worth an initial read. In your case, one option is /\vaa ?bb ?cc


2

Welcome to Vim :) In 3kA there are two "getting started with Vim" lessons in this, a path which @filbranden pointed you down, but to make this more explicit... #1 is "motions" and #2 is changing from 'normal mode' to 'insert mode'. Motions: :help k brings you to the "3. Up-down motions" section of the help manual, in which it ...


1

You can have your autocmds check what the &filetype is when making a decision. For something as short as checking that it's different from 'help' you might be able to go with a one-liner (use | to separate commands), for something more complex go with a separate :function (to help keep your sanity!) For your specific case: set viewoptions-=options ...


1

It looks like you had the 'shellpipe' option misconfigured to just a | instead of a | tee (which would work on Linux/Unix/WSL) or > (which would work on Windows.) You can find the value this option is set to and the origin of this setting with: :verbose set shellpipe? As discussed in the comments, resetting this option to the Windows default worked to ...


1

From your description, it sounds like the text is unconcealed when your cursor enters the line. The recommended option to avoid this is: set concealcursor=nc This will keep characters concealed until you actually want to operate on the hidden characters in visual or insert mode. You can read more with :h 'concealcursor' Side note Since you linked to them, ...


1

It's a bit of a contentious issue. In my opinion you might recieve more passionate responses that constructive ones (My answer should not be taken as 100% objective). For the difference between Vim and Neovim, there was a post there. For the difference with Spacevim, you can see in the main page of their site. From what I understood, it's like a wrapper that ...


1

There are a few ways you can handle command-line editing in Vim mappings. For starters, there's CTRL-\ e which allow you to fully replace the contents of the command-line with the result of an expression. (The documentation at :help c_CTRL-\_e has example usage.) In general, you can use getcmdline() to find what is currently in the command-line, in order to ...


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