7 votes
Accepted

Can macros be edited?

I want to end up in insert mode after a macro. Is there a way to do that? Yes! You can stop recording a macro using Ctrl+O, q (Ctrl+O is a sequence to enter a single Normal-mode command from Insert ...
filbranden's user avatar
  • 28.8k
3 votes
Accepted

What does underscore cursor (caret?) and half cursor (caret?) mean?

Vim allows the cursor shape to be customized. Depending on your system, Vim changes the cursor shape according to the mode it is in. By default, some of these are normal mode: a block cursor insert ...
husB's user avatar
  • 2,083
3 votes

How to copy the selection to clipboard without the indentation that is relevant just in the full file, not in the selection?

In Vim there are :h [p and :h ]p key bindings which do both "put" and "indent adjust" with respect to the current line. Normally that's exactly what one wants.
Matt's user avatar
  • 20.7k
3 votes
Accepted

How to copy the selection to clipboard without the indentation that is relevant just in the full file, not in the selection?

Here's a pure Vim solution: Put the cursor on the first line on the leftmost column you want to yank Hit Ctrl+V Move the cursor down to the last line Hit $ Yank away.
B Layer's user avatar
  • 19.8k
3 votes
Accepted

What is a quick and efficient way to cut and paste text with Vim?

I think you're missing some fundamentals from vim (and I don't mean this in a "one true way to Vim" sense, although my first point does come close to that). As statox mentions in the ...
D. Ben Knoble's user avatar
  • 26.1k
2 votes

Bind :w to ASCII bell?

While I normally advise against remapping <CR> I think here that could be a correct solution: cnoremap <expr> <CR> (getcmdtype() == ':' && getcmdline() =~ '^w$')? '<BS>...
statox's user avatar
  • 49.8k
2 votes
Accepted

Optimise surround with quotes

You can give a try to vim-surround plugin. To put a word into quotes you will go ysiw'. The plugin gives you the power to: add (ysiw") word -> "word" change (csiw"') 'word' ...
Macunaíma's user avatar
2 votes

Optimise surround with quotes

If you're using the VS Code extension that I think you are then my understanding is that it supports at least some plugins and one of those is vim-surround. If that's the case and you're open to using ...
B Layer's user avatar
  • 19.8k
2 votes

Using VSCode key bindings inside Vim

With all due respect, this question reads like "I drive a truck, now I want to try out a sports car. How can I do so without losing cargo hauling capacity?" And the short answer is: you can'...
Friedrich's user avatar
  • 1,866
2 votes
Accepted

Why "vie" selects the entired file?

The e is for "entire". This behavior for ie has probably originated from Vim plug-in kana/vim-textobj-entire, which defines text objects ie and ae for the entire buffer. Text objects ...
filbranden's user avatar
  • 28.8k
2 votes
Accepted

Why does my Vim/VsCodeVim requires double tapping '^' to go to the first character of the line?

I suspect that in your keyboard layout (like in mine ;-)) the ^ key is an 'dead' key, it produces a character only in combination of the next one ^o gives รด, ^^ gives ^. The solution I have is to use: ...
Vivian De Smedt's user avatar
2 votes
Accepted

How to replace text with clipboard content in VsCode using VsCodeVim?

A solution to your use case is to: yank the text you want (using the y command) select the text you want to replace in visual mode (e.g.: viw, vi" and their friends) past the text you have ...
Vivian De Smedt's user avatar
1 vote

Why does my Vim/VsCodeVim requires double tapping '^' to go to the first character of the line?

My own solution (with credits to Vivian): It appears that ^ is a dead key, used to produce accented characters (e.g. for French). Apparently, my Windows installation came with the default keyboard: ...
Qwert Yuiop's user avatar
1 vote

Switch modes without losing the selection

The VSCodeVim extension for VsCode: Has support for the surround extension: With this extension you can: Add quote to your selection with the following action (in visual mode): S". Change from ...
Vivian De Smedt's user avatar
1 vote

Is there a Project Manager extension like VsCode in Vim?

I'd like to recommend my plugin https://github.com/leafOfTree/vim-project. It's a project manager that helps you jump into any project quickly. A vim plugin to manage projects and sessions. Features ...
leaf's user avatar
  • 156
1 vote
Accepted

Is there a Project Manager extension like VsCode in Vim?

I am not aware of an existing vim plugin for this, but here are 2 ways you can accomplish similar functionality. With fzf.vim I accomplished similar functionality to the Project Manager extension ...
Peter Benjamin's user avatar
1 vote
Accepted

How to repeat a command in command-line mode

After running a command :/pattern/delete, the : register can be used to re-run the command like @:, which also takes a count (so 999@: works). After the first use of @:, you can use @@ (unless you ...
D. Ben Knoble's user avatar
  • 26.1k
1 vote

How to replace text with clipboard content in VsCode using VsCodeVim?

Use the replace plugin that is available with vscodevim. use gr[motion] to replace the selection. e.g: use grw to replace the current word at cursor with the clipboard content.
Shahid Roofi Khan's user avatar
1 vote

What's the fastest way to go about defining functions in Python?

Yes there is. Yesterday I gave this answer on the mother site: SO. TL;DR: Bracketing plugins usually provide the right mapping to jump over the closing bracket character that is just after the cursor,...
Luc Hermitte's user avatar
  • 17.4k
1 vote
Accepted

How to add a certain word before the names of methods in Javascript?

Note: I have tested the above process in vim(not it vscode extension). It didn't worked so the answer is for general vim. Using Regular expressions The solution to the first problem is to use "...
Maheer Ali's user avatar
1 vote

How can I record a macro across multiple files

This bug has been documented on the VsCode/Vim repo. Bugs #5636 and #5123 both show that this is a current limitation in this extension. As stated in the above comments, recording and replaying macros ...
g19fanatic's user avatar

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