vim
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| vim [2012/03/25 15:09] – created javapimp | vim [2023/08/18 18:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Syntax Highlighting ====== | ||
| + | < | ||
| + | :syntax on | ||
| + | </ | ||
| + | |||
| + | This can also be added to '' | ||
| + | |||
| ====== Yank or delete between parentheses ====== | ====== Yank or delete between parentheses ====== | ||
| ===== Motion select ===== | ===== Motion select ===== | ||
| Line 36: | Line 43: | ||
| * '' | * '' | ||
| + | |||
| + | ====== Comment/ | ||
| + | |||
| + | ===== Comment ===== | ||
| + | |||
| + | - Enter visual mode: '' | ||
| + | - Select the lines to comment. | ||
| + | - Add the line comment characters to the beginning of each line: | ||
| + | |||
| + | < | ||
| + | : | ||
| + | :s/^/\/\/ - C, C++, C#, Java, JavaScript | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | ===== Uncomment ===== | ||
| + | |||
| + | - Enter visual mode: '' | ||
| + | - Select the lines to comment. | ||
| + | - Remove the line comment characters to the beginning of each line: | ||
| + | |||
| + | < | ||
| + | : | ||
| + | :s/^\/\// - C, C++, C#, Java, JavaScript | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | ====== Auto Indentation ====== | ||
| + | < | ||
| + | :set autoindent | ||
| + | :set cindent | ||
| + | </ | ||
| + | |||
| + | ====== Add/Remove indentation ====== | ||
| + | |||
| + | - Enter visual mode: '' | ||
| + | - Select the lines to indent. | ||
| + | - ''>'' | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | ====== Replace word with copied text ====== | ||
| + | |||
| + | - Yank (or delete) the text into a buffer: '' | ||
| + | - Move to the beginning of the word to replace. | ||
| + | - '' | ||
| + | |||
| + | ====== Reload the current file from disk ====== | ||
| + | |||
| + | * Reload the current file: '': | ||
| + | * Reload the current file after it's been modified: '': | ||
| + | |||
| + | ====== Change Case ====== | ||
| + | |||
| + | * Change word to lowercase: '' | ||
| + | * Change word to uppercase: '' | ||
| + | * Toggle word case (aBBa -> AbbA): '' | ||
| + | |||
| + | |||
| + | |||
vim.1332688153.txt.gz · Last modified: 2023/08/18 18:15 (external edit)