Posts

Showing posts with the label Vim

Settings ~/.vimrc

Image
  These settings are commonly used to customize the behavior and appearance of the Vim text editor. They ensure consistent coding style, comfortable text navigation, and useful features during editing. Make sure to adapt these settings according to your preferences and the specific requirements of your projects. set encoding=utf8 > Set encoding to UTF- 8 set paste > Enable paste mode set expandtab > Use spaces instead of tabs for indentation set textwidth= 0 > Disable automatic text wrapping set tabstop= 4 > Number of spaces that a <Tab> in the file counts for set softtabstop= 4 > Number of spaces to use for each step of (auto)indent set shiftwidth= 4 > Number of spaces to use for (auto)indent set smartindent > Enable smart auto-indenting set backspace=indent,eol,start > Allow backspacing over autoindent, line breaks, and start of insert ...

Vim Commands (Vim Cheat Sheet)

Global :h[elp] keyword  - open help for keyword :sav[eas] file  - save file as :clo[se]  - close current pane :ter[minal]  - open a terminal window K  - open man page for word under the cursor Tip  Run  vimtutor  in a terminal to learn the first Vim commands. Cursor movement h  - move cursor left j  - move cursor down k  - move cursor up l  - move cursor right gj  - move cursor down (multi-line text) gk  - move cursor up (multi-line text) H  - move to top of screen M  - move to middle of screen L  - move to bottom of screen w  - jump forwards to the start of a word W  - jump forwards to the start of a word (words can contain punctuation) e  - jump forwards to the end of a word E  - jump forwards to the end of a word (words can contain punctuation) b  - jump backwards to the start of a word B  - jump backwards to the start of a word (words can contain punctuation) ge  -...