Last active
November 11, 2019 18:15
-
-
Save RomainLanz/1557c422c98cdfe3939c7a47cadaf6c5 to your computer and use it in GitHub Desktop.
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 " Use VIM settings instead of Vi. | |
syntax enable " Enable syntax highlighting. | |
so ~/.vim/plugins.vim " Load all plugins. | |
"-------------Misc-------------" | |
set backspace=indent,eol,start " Make backspace behave like every other editor. | |
set tw=0 " Disable automatic linebreak. | |
set noerrorbells visualbell t_vb= " No damn bells! | |
set autowriteall " Automatically write the file when switching buffer. | |
set complete=.,w,b,u " Set our desired autocompletion matching. | |
set history=1000 " Increase the command history size. | |
set nobackup " Disable backup system. | |
set directory=$HOME/.vim/swp// " Move swp files. | |
set undofile " Maintain undo history between session. | |
set undodir=$HOME/.vim/undodir " Move undo files. | |
set autoread " Auto-update the buffer if the file has been changed. | |
"-------------Spacing-------------" | |
set autoindent " Copy indent from current line when starting a new one. | |
set expandtab " Use spaces instead of tabs. | |
set tabstop=2 " Number of space to add on tab. | |
set softtabstop=2 " Number of space to add on tab (insert). | |
set shiftwidth=2 " Number of space for indentation. | |
"-------------Visuals-------------" | |
colorscheme atom-dark " Change default colorscheme. | |
set t_CO=256 " Use 256 colors in terminal. | |
set nonumber " Deactivate the line numbers. | |
set ruler " Active the ruler. | |
set laststatus=0 " Disable the status bar. | |
set linespace=15 " Change the vertical spacing. | |
set guifont=mononoki:h17 " Change font & font size. | |
set guioptions-=l " Remove left scrollbar. | |
set guioptions-=L " Remove left scrollbar on split. | |
set guioptions-=r " Remove right scrollbar. | |
set guioptions-=R " Remove right scrollbar on split. | |
set guioptions-=e " Disabled gui ugly tabs. | |
set foldcolumn=2 " Fake custom left padding. | |
hi LineNr guibg=bg | |
hi foldcolumn guibg=bg | |
" Remove ugly split borders. | |
hi vertsplit guifg=bg guibg=fg | |
"-------------Searching-------------" | |
set hlsearch " Activate search highlight. | |
set incsearch | |
"-------------Split Management-------------" | |
set splitbelow " Create the new split below by default. | |
set splitright " Create the new split to the right by default. | |
" Simplify focusing bottom split. | |
nmap <C-J> <C-W><C-J> | |
" Simplify focusing top split. | |
nmap <C-K> <C-W><C-K> | |
" Simplify focusing left split. | |
nmap <C-H> <C-W><C-H> | |
" Simplify focusing right split. | |
nmap <C-L> <C-W><C-L> | |
"-------------Mappings-------------" | |
let mapleader=',' " Use a comma for the leader. | |
" Make it easy to edit the vimrc file. | |
nmap <Leader>ev :tabedit $MYVIMRC<cr> | |
" Remove search highlight. | |
nmap <Leader><space> :nohlsearch<cr> | |
" Make NERDTree easier to toggle. | |
nmap <D-1> :NERDTreeToggle<cr> | |
" Open CtrlP buffer. | |
nmap <D-p> :CtrlP<cr> | |
" Go throught tags in the current buffer. | |
nmap <D-R> :CtrlPBufTag<cr> | |
" Go throught last opened files. | |
nmap <D-e> :CtrrlPMRUFiles<cr> | |
"-------------Plugins-------------" | |
" CtrlP | |
let g:ctrlp_match_window= 'top,order:ttb,min:1,max:30,results:30' " Change the display of CtrlP. | |
let g:ctrlp_custom_ignore='rode_modules\DS_Store|git' " Ignore some files. | |
" NERDTree | |
let NERDTreeHijackNetrw=0 " Avoid NERDTree to take over netrw. | |
"-------------Auto-Commannds-------------" | |
augroup autosourcing | |
autocmd! | |
autocmd BufWritePost .vimrc source % " Automatically source the vimrc file on save. | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment