💾 Archived View for ychbn.flounder.online › posts › 2020-11-27-vim-cheatsheet.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

My vim cheatcheet

date: 2020-11-27 09:28:34 +0300

Main

About

Contacts

I google some vim commands on regular basis, but don't remember them. So, it's time to create my own vim cheatsheet.

Ex

- ``-`` - jump to parent directory

- ``%`` - create file in current directory

- ``d`` - create new directory

- ``D`` - delete file/directory under cursor

- ``R`` - Rename file under cursor

Work with windows

- ``Ctrl-w v`` - split window vertically

- ``Ctrl-w s`` - split window hotizontally

- ``Ctrl-w k`` - move to upper window

- ``Ctrl-w l`` - move to right window

- ``Ctrl-w h`` - move to left window

- ``Ctrl-w o`` - close all windows except current

Tips

Delete all trailing spaces when save buffer(save it to .vimrc):

autocmd BufWritePre * %s/\s\+$//e

Seee also:

Everyday vim commands