diff options
author | Jakob Stendahl <jakob.stendahl@outlook.com> | 2021-03-09 16:29:58 +0100 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2021-03-09 16:29:58 +0100 |
commit | a52da18d18a51774e8c949e2002023212a9c6e75 (patch) | |
tree | caf49ceef7d3db6515bdfc1efca270896c782c67 /Cheatsheet.md | |
parent | 045c955f835fdb11983117ca6e27aa4543de4109 (diff) | |
download | dotfiles-a52da18d18a51774e8c949e2002023212a9c6e75.tar.gz dotfiles-a52da18d18a51774e8c949e2002023212a9c6e75.zip |
Tweak vim a bit
Diffstat (limited to 'Cheatsheet.md')
-rw-r--r-- | Cheatsheet.md | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Cheatsheet.md b/Cheatsheet.md new file mode 100644 index 0000000..ec9c8c0 --- /dev/null +++ b/Cheatsheet.md @@ -0,0 +1,78 @@ +# Cheatsheet +Cheatsheets for different terminal things. + +## Vim + +### General vim + +https://vim.rtorr.com + +### [jakobst1n's](https://github.com/jakobst1n/dotfiles) additional keymaps +- Leader key: `,` +- Fast save (`:w!`): `<leader>w` +- `:W` -> `sudo save` + +#### Search +- Visual mode `*` or `#` searches for current selection +- Space: `/` (search) +- C-space: `?` (backward search) + +#### Windows +- `<C-(j|k|h|l)>` move between windows + +#### Buffers +- `<leader>bd` Close current buffer. +- `<leader>ba` Close all buffers +- `<leader>l` next buffer +- `<leader>h` prev buffer + +#### tabs +- `<leader>tn` new tab +- `<leader>to` tabonly +- `<leader>tc` close tab +- `<leader>tm` move tab +- `<leader>t<leader>` next tab +- `<leader>tl` Last used tab +- `<leader>te` Open new tab with current buffers path. + +#### Working directory +- `<leader>cd` Set working directory to path of current buffer + +#### Line moving +You can move a line of text using `ALT+[jk]` or `CMD+[jk]` on mac. + +#### Spell checking +- `<leader>ss` Toggle spellcheck +- `<leader>sn` `]s` +- `<leader>sp` `[s` +- `<leader>sa` `zg` +- `<leader>s?` `z=` + +#### Clipboard +- `<leader>pp` Toggle paste mode + +#### NerdTree +- `<F3>` To toggle + +#### FuzzyFinder +- `;` To open + +#### CoC +- Use `<TAB>` for autocomplete +- `gd` Go to definition +- `gy` Go to type definition +- `gi` Go to implementation +- `gr` Go to references +- `K` To show documentation in preview window +- `<leader>rn` Rename symbol +- `<leader>f` format selected + +#### Multiple-cursors +- `<C-d>`->`start_word_key` +- `<A-d>`->`select_all_word_key` +- `g<C-d>`->`start_key` +- `g<A-D>`->`select_all_key` +- `<C-d>`->`next_key` +- `<C-p>`->`prev_key` +- `<C-x>`->`skip_key` +- `<ESC>`->`quit_key`
\ No newline at end of file |