New answers tagged vi
As far as I know Drav Sloan is correct: there is no universal "vi" mode setting. You can ease the pain for a lot of more modern command line programs by having a file named $HOME/.inputrc with this line in it: set editing-mode vi A lot of programs use readline, gnuplot, psql, impala-shell and others. This may get you most of way to where you want to be.
I added those keys : bindkey -M vicmd '?' history-incremental-search-backward bindkey -M vicmd '/' history-incremental-search-forward I do as CTRL+R in emacs mode and I prefer
Caps_Lock is the one key on the keyboard that has no place in the modern age; unless, of course, you are sitting in a basement somewhere, in your underwear, RAILING against the injustices of some percieved slight from an anonymous, and equally irate, stranger somewhere else in the half light of the Internet. Remapping Caps_Lock to Escape is not only going ...
With a few rare exceptions you can use Ctrl-C instead.
Try this: esc + b + i esc puts you in normal mode b goes to the beginning of the previous word i puts you in insert mode.
That symbol represents a NULL character, with ASCII value 000. You could try: :%s/\%x00/ /g Alternative: On a keyboard where the @ symbol is on top of the 2 key (thanks Celada) you can do: %s/<CTRL-2>/ /g (on PC) %s/<CTRL-SHIFT-2>/ /g (on Mac) where <CTRL-2> means first press down the CTRL on PC, keeping it as pressed down, hit 2, ...
Somehow, the space characters are represented by ^@ in vi. It's not vi that did that. Although you type command lines in shells with spaces between the arguments, command lines are actually discrete sequences of strings internally, not one long space-separated string. The shell separated the command line into individual argument strings before the ...
The normal way to add a new line (or new lines) below the current line is to type o (open). It will immediately create a new, blank line, so you don't need to type Enter (until/unless you want to add two or more lines). Are you using i (insert)? To add text after the current position, use a (append). Or, to add text at the end of the current line, use A, ...
e is used to go to end of word. You should use $ to go to end of line. You can insert another line from the current position by using o (for open). You can also use A to append something to the end of line from anywhere on the line.
just place in your ~/.zshrc bindkey "^?" backward-delete-char
If your Vim is compiled with the +clipboard feature (check if +clipboard appears in :version or in vim --version), then there are two special registers that designate the system clipboard. The register "+ designates the clipboard, which is used by Ctrl+C/Ctrl+V. The register "* designates the primary selection, which is used by mouse selection and ...
Top 50 recent answers are included