Created
December 15, 2020 07:55
-
-
Save aurora1625/c10d5b5a294f84954e81cb70b433de53 to your computer and use it in GitHub Desktop.
vimrc
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
set nocompatible " not vi compatible | |
syntax on " enable syntax processing | |
" Spaces & Tabs | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set shiftwidth=4 " Insert 4 spaces on a tab | |
set expandtab " tabs are spaces, mainly because of python | |
" UI Config | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set number " show line numbers | |
set relativenumber " show relative numbering | |
set showcmd " show command in bottom bar | |
set cursorline " highlight current line | |
filetype indent on " load filetype-specific indent files | |
filetype plugin on " load filetype specific plugin files | |
set wildmenu " visual autocomplete for command menu | |
set showmatch " highlight matching [{()}] | |
set laststatus=2 " Show the status line at the bottom | |
set mouse+=a " A necessary evil, mouse support | |
set noerrorbells visualbell t_vb= "Disable annoying error noises | |
set splitbelow " Open new vertical split bottom | |
set splitright " Open new horizontal splits right | |
set linebreak " Have lines wrap instead of continue off-screen | |
set scrolloff=12 " Keep cursor in approximately the middle of the screen | |
set updatetime=100 " Some plugins require fast updatetime | |
set ttyfast " Improve redrawing | |
" Buffers | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set hidden " Allows having hidden buffers (not displayed in any window) | |
"Searching | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set incsearch " search as characters are entered | |
set hlsearch " highlight matches | |
set ignorecase " Ignore case in searches by default | |
set smartcase " But make it case sensitive if an uppercase is entered | |
" turn off search highlight | |
vnoremap <C-h> :nohlsearch<cr> | |
nnoremap <C-h> :nohlsearch<cr> | |
" Ignore files for completion | |
set wildignore+=*/.git/*,*/tmp/*,*.swp | |
" Tmux | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" These lines change the cursor from block cursor mode to vertical bar cursor mode when using tmux. | |
" Without these lines, tmux always uses block cursor mode. | |
" allows cursor change in tmux mode | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment