Last active
March 5, 2024 21:49
-
-
Save newtonkiragu/ff74ad1c553b27e0a1ef310b4ab5dee1 to your computer and use it in GitHub Desktop.
Custom vim setup. Clone in root directory. This is a revised version that does not need any plugin installed (vundle or otherwise). Serves my needs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Automatic reloading of .vimrc | |
autocmd! bufwritepost .vimrc source % | |
" Set shift width to 4 spaces. | |
set shiftwidth=4 | |
set shiftround | |
" Set tab width to 4 columns. | |
set tabstop=4 | |
set softtabstop=4 | |
" Use space characters instead of tabs. | |
set expandtab | |
" Do not save backup and swap files. | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
" Do not let cursor scroll below or above N number of lines when scrolling. | |
set scrolloff=10 | |
" Do not wrap lines. Allow long lines to extend as far as the line goes. | |
set nowrap | |
" While searching though a file incrementally highlight matching characters as you type. | |
set incsearch | |
" Ignore capital letters during search. | |
set ignorecase | |
" Override the ignorecase option if searching for capital letters. | |
" This will allow you to search specifically for capital letters. | |
set smartcase | |
" Show partial command you type in the last line of the screen. | |
set showcmd | |
" Show the mode you are on the last line. | |
set showmode | |
" Show matching words during a search. | |
set showmatch | |
" Use highlighting when doing a search. | |
set hlsearch | |
" Set the commands to save in history default number is 20. | |
set history=1000 | |
set undolevels=1000 | |
" Add numbers to each line on the left-hand side. | |
set number | |
set number " show line numbers | |
set tw=79 " width of document (used by gd) | |
set nowrap " don't automatically wrap on load | |
set fo-=t " don't automatically wrap text when typing | |
set colorcolumn=80 | |
highlight ColorColumn ctermbg=233 | |
" Turn syntax highlighting on. | |
syntax on | |
" easier formatting of paragraphs | |
vmap Q gq | |
nmap Q gqap | |
" Enable mouse input | |
set mouse=a | |
"Shift-LeftClick a word to search forwards, or Shift-RightClick to search backwards. | |
set mousemodel=extend | |
" Better copy & paste | |
" When you want to paste large blocks of code into vim, press F2 before you | |
" paste. At the bottom you should see ``-- INSERT (paste) --``. | |
set pastetoggle=<F2> | |
set clipboard=unnamed" Automatic reloading of .vimrc | |
autocmd! bufwritepost .vimrc source % | |
" Set shift width to 4 spaces. | |
set shiftwidth=4 | |
set shiftround | |
" Set tab width to 4 columns. | |
set tabstop=4 | |
set softtabstop=4 | |
" Use space characters instead of tabs. | |
set expandtab | |
" Do not save backup and swap files. | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
" Do not let cursor scroll below or above N number of lines when scrolling. | |
set scrolloff=10 | |
" Do not wrap lines. Allow long lines to extend as far as the line goes. | |
set nowrap | |
" While searching though a file incrementally highlight matching characters as you type. | |
set incsearch | |
" Ignore capital letters during search. | |
set ignorecase | |
" Override the ignorecase option if searching for capital letters. | |
" This will allow you to search specifically for capital letters. | |
set smartcase | |
" Show partial command you type in the last line of the screen. | |
set showcmd | |
" Show the mode you are on the last line. | |
set showmode | |
" Show matching words during a search. | |
set showmatch | |
" Use highlighting when doing a search. | |
set hlsearch | |
" Set the commands to save in history default number is 20. | |
set history=1000 | |
set undolevels=1000 | |
" Add numbers to each line on the left-hand side. | |
set number | |
set number " show line numbers | |
set tw=79 " width of document (used by gd) | |
set nowrap " don't automatically wrap on load | |
set fo-=t " don't automatically wrap text when typing | |
set colorcolumn=80 | |
highlight ColorColumn ctermbg=233 | |
" Turn syntax highlighting on. | |
syntax on | |
" easier formatting of paragraphs | |
vmap Q gq | |
nmap Q gqap | |
" Enable mouse input | |
set mouse=a | |
"Shift-LeftClick a word to search forwards, or Shift-RightClick to search backwards. | |
set mousemodel=extend | |
" Better copy & paste | |
" When you want to paste large blocks of code into vim, press F2 before you | |
" paste. At the bottom you should see ``-- INSERT (paste) --``. | |
set pastetoggle=<F2> | |
set clipboard=unnamed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install vundle first