- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| " sudo apt update && sudo apt install vim git curl | |
| " Ativa número de linhas | |
| set number | |
| set relativenumber | |
| " Habilita a indentação automática e inteligente | |
| set autoindent | |
| set smartindent |
| " Configuration file for vim | |
| set modelines=0 " CVE-2007-2438 | |
| " Normally we use vim-extensions. If you want true vi-compatibility | |
| " remove change the following statements | |
| set nocompatible " Use Vim defaults instead of 100% vi compatibility | |
| set backspace=2 " more powerful backspacing | |
| " Don't write backup file if vim is being called by "crontab -e" | |
| au BufWrite /private/tmp/crontab.* set nowritebackup nobackup |
Um guia completo de atalhos para produtividade máxima com Vim/Neovim.
| On Linux, the Keychron K2 doesn't register any of the F1-F12 function keys as actual F keys, instead, treating them as multimedia keys by default. Here's how to fix it! | |
| They keyboard has 2 modes: Windows/Android and MacOS, but neither mode worked properly out of the box. | |
| To fix this: | |
| Set the keyboard to Windows mode via the side switch | |
| Use Fn + X + L (hold for 4 seconds) to set the function key row to "Function" mode. (usually all that's necessary on Windows) | |
| echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode | |
| echo 1 | sudo tee /sys/module/hid_apple/parameters/fnmode (Default) | |
| Once complete, my F1-F12 keys work properly, and holding Fn turns them into multimedia keys. You can use the evtest utility to check how keyboard keys are registering until you get the above combination of settings configured properly. |
| # Install PostgreSQL | |
| # Create the file repository configuration | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
| # Import the repository signing key | |
| wget - quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| # Update the package lists and update the system | |
| sudo apt update && sudo apt upgrade -y |
Forked from: Cesar Díez (https://github.com/cesards)
* In titles means it has been categorized more than once (in different categories)