Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
home_server:home_server_setup:other_services:vim [2023-08-26 Sat wk34 11:19] – [Moving around in the file] baumkp | home_server:home_server_setup:other_services:vim [2024-03-24 Sun wk12 11:04] – [VIM Customisation] baumkp | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag> | + | {{tag> |
=====VIM Customisation===== | =====VIM Customisation===== | ||
+ | ++++~/ | ||
+ | <code bash>: | ||
+ | :set nocompatible | ||
+ | syntax on | ||
+ | :set number relativenumber | ||
+ | set autoindent expandtab tabstop=2 shiftwidth=2 | ||
+ | filetype plugin on | ||
+ | filetype indent on | ||
+ | set cursorline | ||
+ | set cursorcolumn | ||
+ | set shiftwidth=2 | ||
+ | set tabstop=2 | ||
+ | set expandtab</ | ||
+ | ++++ | ||
====vim color scheme==== | ====vim color scheme==== | ||
I use the VI (or VIM) editor. It comes standard on most Linux and UNIX distributions, | I use the VI (or VIM) editor. It comes standard on most Linux and UNIX distributions, | ||
Line 67: | Line 80: | ||
| Ctrl + o | Move backward through the jump history | | Ctrl + o | Move backward through the jump history | ||
| Ctrl + i | Move forward through the jump history | | Ctrl + i | Move forward through the jump history | ||
+ | | gg | Move to top of file | | ||
+ | | Shift + g | move to end of file | | ||
| w | Move to next word | | | w | Move to next word | | ||
| W | Move to next blank delimited word | | | W | Move to next blank delimited word | | ||
Line 168: | Line 183: | ||
| %%!}fmt%% | | %%!}fmt%% | ||
| %%5!!fmt%% | | %%5!!fmt%% | ||
- | =====Undo | + | =====Undo, redo and report===== |
^ Vim Command | ^ Vim Command | ||
- | | u | Undo the last action. | | + | | u | Undo the last action |
- | | U | Undo all the latest changes that were made to the current line. | | + | | U | Undo all the latest changes that were made to the current line | |
- | | Ctrl + r | Redo. | | + | | Ctrl + r | Redo | |
+ | | | ||
=====Search===== | =====Search===== | ||
^ Vim Command | ^ Vim Command | ||
Line 355: | Line 371: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
====Requires More Research==== | ====Requires More Research==== | ||
These links should be explored to see what additional information could be gathered for this cheat sheet. | These links should be explored to see what additional information could be gathered for this cheat sheet. | ||
*[[https:// | *[[https:// | ||
- | *[[http:// | ||
*[[http:// | *[[http:// | ||
*[[http:// | *[[http:// | ||
*[[http:// | *[[http:// | ||
- | *[[http:// | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
- | *[[http:// | ||
*[[http:// | *[[http:// | ||
- | *[[http:// | ||
- | *[[https:// | ||
- | | ||
*[[http:// | *[[http:// | ||
- | *[[http:// | ||
*[[http:// | *[[http:// | ||
- | *[[http:// | ||
*[[http:// | *[[http:// | ||
*[[http:// | *[[http:// | ||
*[[https:// | *[[https:// | ||
- | *[[https:// | + | *[[https:// |
---- | ---- |