From b6ae7a2fed8409e09ade52c48f026317c18b7b26 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Tue, 14 Jan 2020 02:29:59 +0100 Subject: [PATCH] improve vim --- text/vim/completion.md | 8 ++++++++ text/vim/navigate.md | 39 +++++++++++++++++++++++++++++++++++++++ text/vim/screens.md | 11 +++++++++++ text/vim/vim.md | 30 +----------------------------- text/vim/windows.md | 11 +++++++++++ 5 files changed, 70 insertions(+), 29 deletions(-) create mode 100644 text/vim/completion.md create mode 100644 text/vim/navigate.md create mode 100644 text/vim/screens.md create mode 100644 text/vim/windows.md diff --git a/text/vim/completion.md b/text/vim/completion.md new file mode 100644 index 0000000..eb06064 --- /dev/null +++ b/text/vim/completion.md @@ -0,0 +1,8 @@ + +Complete the word: + +> C-n + +Complete the full segment: + +> C-x C-l diff --git a/text/vim/navigate.md b/text/vim/navigate.md new file mode 100644 index 0000000..9f699cb --- /dev/null +++ b/text/vim/navigate.md @@ -0,0 +1,39 @@ + +| Move | Command | +|:-----|:-------------| +|Down page | C-f | +| Down half page | C-d | +| Up page | C-b | +| Up half page | C-u | + +## Scroll + +> C-e + +> C-y + +## Jumps + +Go through your last jumps: + +> C-I + +> C-O + +Go to the last and previous places you've changed: + +> g; + +> g, + +# Project Structure + +Make a 20 character 'visual split' in the current working directory ('`.`'). + +> :20vs . + +Change the view for this: + +> C-w x + + diff --git a/text/vim/screens.md b/text/vim/screens.md new file mode 100644 index 0000000..664547b --- /dev/null +++ b/text/vim/screens.md @@ -0,0 +1,11 @@ + +Make a horizontal split with: + +> :sp + +> C-w s + +Or a vertical split with: + +> :vsp +> C-w v diff --git a/text/vim/vim.md b/text/vim/vim.md index 2082de8..82d7094 100644 --- a/text/vim/vim.md +++ b/text/vim/vim.md @@ -1,30 +1,2 @@ - -To disable ignoring case enter: - -> :set noic - -To perform one case-insensitive search, enter: - -> /keyword\c - -# Split Screen - -Make a horizontal split with: - -> :sp - -Or a vertical split with: - -> :vsp - -Then place window-commands with Ctrl+w. - -|Command | Key | -|:-------|:---:| -|Down|j| -|Up|k| -|Quit current windows| q | -|Rotate window positions | r / R| -|Enlarge/ shrink window | +/- | - +Describe what you want, then press as few keys as possible. diff --git a/text/vim/windows.md b/text/vim/windows.md new file mode 100644 index 0000000..16954ee --- /dev/null +++ b/text/vim/windows.md @@ -0,0 +1,11 @@ + +| Command | Keys | +|:-----|:----:| +| split window | C-w s | +| split window vertically | C-w v | +| close window | C-q | +| change window | C-w w | +| rotate windows | C-w r | +| split open new file | :sf path/file | + +