srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/vim.md
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2022-12-07 21:55:52 +0200
committersrdusr <[email protected]>2022-12-07 21:55:52 +0200
commit680f86b494bf855f34e3036e68cab8cbf6028918 (patch)
treee290eddef5f2e5d9ea767189cca175ef214b6828 /tools/vim.md
parenta029d28872aef37c5192f32d46fb7d00da7e41a7 (diff)
downloadnotes-680f86b494bf855f34e3036e68cab8cbf6028918.tar.gz
notes-680f86b494bf855f34e3036e68cab8cbf6028918.zip
Fixed formatting for items that were in italic/bold into unorderd lists
Diffstat (limited to 'tools/vim.md')
-rw-r--r--tools/vim.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/tools/vim.md b/tools/vim.md
index 720291e..d1b43cc 100644
--- a/tools/vim.md
+++ b/tools/vim.md
@@ -98,7 +98,7 @@ n - Repeat the last / or ? command
N - Repeat the last / or ? command in the opposite direction
```
-*** NORMAL MODE -> INSERT MODE
+* NORMAL MODE -> INSERT MODE
```
i - Enter insert mode to the left of the cursor
a - Enter insert mode to the right of the cursor
@@ -113,7 +113,7 @@ cc - Delete current line and enter insert mode (unlike dd which leaves y
C - Delete (change) from cursor to end of line, and enter insert mode
```
-*** DELETION
+* Deletion
```
x - Delete character forward (under cursor). use x do delete backwards (before cursor)
r - Replace single character under cursor, and remain in normal mode
@@ -124,7 +124,7 @@ dd - Delete entire current line
D - Delete until end of line
```
-*** YANK & PUT
+* Yank & Put
```
y - Yank (copy) highlighted text
yy - Yank current linepPut (paste) yanked text below current line
@@ -136,7 +136,7 @@ J - Join current line with the next line. Use gJ to exclude join-positi
xp - Transpose two letters (delete and paste, technically)
```
-*** VISUAL MODE
+* VISUAL MODE
```
v - Enter visual mode and highlight characters
V - Enter visual mode and highlight lines
@@ -152,7 +152,7 @@ vac - Highlight all text including the pair marked with c (like va<, va'
vic - Highlight all text inside the pair marked with c
```
-*** MARKING
+* Marking
```
ma - Set a marker a at cursor position to come back to later. a can be any character you choose
mb - Set a marker b at current position
@@ -171,7 +171,7 @@ y`a - Yank text to unnamed buffer from cursor to position of mark a
```
-*** VIM FOLDING
+* Vim Folding
```
zf#j - creates a fold from the cursor down # lines.
zf/string - creates a fold from the cursor to string .
@@ -200,7 +200,7 @@ zR - decreases the foldlevel to zero -- all folds will be open.
:set foldmethod=indent - automatically fold programms per its indentation
```
-*** MISCELLANEOUS
+* Miscellaneous
```
u - Undo
U - Undo all changes on current line
@@ -226,7 +226,7 @@ vim +/bash cronjob-lab.yml - opens the file cronjob-lab.yml on the first occ
vim scp://balasundaramm@mgmt-bst:22/~/automation/test-file.txt - Edit a remote file via scp
```
-*** HISTORY/COMMAND BUFFER
+* History/Command buffer
```
q: - list history in command buffer
q/ - search history in command buffer
@@ -239,7 +239,7 @@ CTRL+n - Press after typing part of a word. It scrolls down the list
CTRL+p - Press after typing part of a word. It scrolls up the list of all previously used words
```
-*** BUFFERS
+* Buffers
```
:ls (or :buffers) - list / show available buffers
:e filename - Edit a file in a new buffer
@@ -257,7 +257,7 @@ CTRL+p - Press after typing part of a word. It scrolls up the list of
:.! cat <file_path> - reads the output of the command (eg: cat) into buffer or !! in ex-mode
```
-*** TAB VIEWS
+* Tab Views
```
:tabe filename - opens the file in newtab
:tabe new - open an empty tab
@@ -271,14 +271,14 @@ CTRL+p - Press after typing part of a word. It scrolls up the list of
vim -p *.txt - open all txt files in tabs
```
-*** TAB NAVIGATION
+* Tab navigation
```
gt - go to next tab
gT - go to previous tab
{i}gt - go to tab in position i
```
-*** TAB SHORTCUTS
+* Tab shortcuts
```
CTRL+W T - Break out current window into a new tabview
CTRL+W o - Close every window in the current tabview but the current one
@@ -286,7 +286,7 @@ CTRL+W n - create a new window in the current tabview
CTRL+W c - Close current window in the current tabview
```
-*** WINDOW MANAGEMENT
+* Window management
```
*split screen horizontal
:split filename
@@ -325,7 +325,7 @@ CTRL+w o - Maxmize current window (note: this overwrites your current wi
```
-*** MOVING WINDOWS
+* Moving windows
```
CTRL+W r - Swap bottom/top if split horizontally
CTRL+W R - Swap top/bottom if split horizontally
@@ -339,7 +339,7 @@ CTRL+w K - Move current window the far top and full width of the screen
CTRL+w L - Move current window the far right and full height of the screen
```
-*** NAVIGATE BETWEEN WINDOWS
+* Navigate between windows
```
CTRL+w CTRL+w - switch between windows
CTRL+w UP - Move to the top window from current window
@@ -348,7 +348,7 @@ CTRL+w LEFT - Move to the left window from current window
CTRL+w RIGHT - Move to the right window from current window
```
-*** RESIZING WINDOWS
+* Resizing windows
```
*Sometimes windows open up funny or are rendered incorrectly after separating from an external monitor. Or maybe you want to make more room for an important file.
@@ -362,20 +362,20 @@ CTRL+w - - Incrementally decrease the window's height. Takes a parameter
CTRL+w + - Incrementally increase the window's height. Takes a parameter, e.g. CTRL-w 10 +
```
-*** COMMENT LINES (TCOMMENT PLUGIN)
+* Comment lines (Tcomment plugin)
```
CTRL+_ CTRL+_ - Comment a line using tcomment
CTRL+V - #{Select the block before commenting a block,
CTRL+_ CTRL+_ - Comment a block of line using tcomment}
```
-*** MODELINE MAGIC
+* Modeline magic
```
:set modeline - Enable modeline magic or add this option to your .vimrc
\ml - write the modeline based on your settings to the file
```
-*** NERDTree Plugin
+* NERDTree Plugin
```
CTRL-n - Toggle