From a52da18d18a51774e8c949e2002023212a9c6e75 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Tue, 9 Mar 2021 16:29:58 +0100 Subject: Tweak vim a bit --- Cheatsheet.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Cheatsheet.md (limited to 'Cheatsheet.md') 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!`): `w` +- `:W` -> `sudo save` + +#### Search +- Visual mode `*` or `#` searches for current selection +- Space: `/` (search) +- C-space: `?` (backward search) + +#### Windows +- `` move between windows + +#### Buffers +- `bd` Close current buffer. +- `ba` Close all buffers +- `l` next buffer +- `h` prev buffer + +#### tabs +- `tn` new tab +- `to` tabonly +- `tc` close tab +- `tm` move tab +- `t` next tab +- `tl` Last used tab +- `te` Open new tab with current buffers path. + +#### Working directory +- `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 +- `ss` Toggle spellcheck +- `sn` `]s` +- `sp` `[s` +- `sa` `zg` +- `s?` `z=` + +#### Clipboard +- `pp` Toggle paste mode + +#### NerdTree +- `` To toggle + +#### FuzzyFinder +- `;` To open + +#### CoC +- Use `` 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 +- `rn` Rename symbol +- `f` format selected + +#### Multiple-cursors +- ``->`start_word_key` +- ``->`select_all_word_key` +- `g`->`start_key` +- `g`->`select_all_key` +- ``->`next_key` +- ``->`prev_key` +- ``->`skip_key` +- ``->`quit_key` \ No newline at end of file -- cgit v1.2.3