Added vim chapter

This commit is contained in:
2023-03-23 07:58:19 +01:00
parent 34d6af9826
commit 0f855fdf65
2 changed files with 61 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
* [Django](./Python/django/README.md)
* [pip](./Python/pip.md)
* [PostgreSQL](./postgresql.md)
* [Vim](./vim.md)
* [VMWare](./VMWare/README.md)
* [WSL](./WSL.md)

60
vim.md Normal file
View File

@@ -0,0 +1,60 @@
# VIM
## Keyboard shortcuts
### Scrolling
| Shortcut | Description |
|-----------|------------------------------|
| h | Scroll left |
| j | Scroll down |
| k | Scroll up |
| l | Scroll right |
| Ctrl + b | Scroll up one full screen |
| Ctrl + f | Scroll down one full screen |
| Ctrl + u | Scroll up half a screen |
| Ctrl + d | Scroll down half a screen |
## .vimrc
```vimrc
" set paste " Enable paste mode
set tabstop=4
set shiftwidth=4
set expandtab
set number " Display line numbers
set ruler " Show cursor position
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=119 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
au BufNewFile,BufRead *.sh
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
au BufNewFile,BufRead *.yml
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
au BufNewFile,BufRead *.yaml
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
```