Vim Basics
Installation
sudo apt-get update -y \
&& sudo apt-get install -y vim
With Vundle
https://raw.githubusercontent.com/hhk7734/conf/master/.vimrc
wget https://raw.githubusercontent.com/hhk7734/conf/master/.vimrc -O ~/.vimrc
sudo apt-get install -y git cmake python3-dev g++ \
&& git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim \
&& vim +PluginInstall +qall \
&& echo -e "\ncolor dracula" >> ~/.vimrc \
&& cd ~/.vim/bundle/YouCompleteMe \
&& python3 ./install.py --clang-completer
https://raw.githubusercontent.com/hhk7734/conf/master/.ycm_extra_conf.py
wget https://raw.githubusercontent.com/hhk7734/conf/master/.ycm_extra_conf.py -O ~/.vim/.ycm_extra_conf.py \
&& printf "\nlet g:ycm_global_ycm_extra_conf = '%s/.vim/.ycm_extra_conf.py'" $HOME >> ~/.vimrc
Without Vundle
https://raw.githubusercontent.com/hhk7734/conf/master/without_vundle_vimrc/.vimrc
wget https://raw.githubusercontent.com/hhk7734/conf/master/without_vundle_vimrc/.vimrc -O ~/.vimrc
Normal mode
:h key-notation
: key notation
u
: undo<C-R>
: redo
=
: align ex) gg=G, =3<C-K>
: clang-format (μ€μ ν κ²½μ°)
:! <command>
: shellμμ \<command>λ₯Ό μ€νν©λλ€.:r[ead]! <command>
: stdout -> vim:w[rite]! <command>
: vim -> stdin:sh
: μλ‘ κ°κΈ°<C-D>
: μμμ λμμ€κΈ°
<C-A>
: μ«μ μ¦κ°<C-X>
: μ«μ κ°μ
Visual mode
u
: μλ¬Έμλ‘ λ³νU
: λλ¬Έμλ‘ λ³ν