Last active
October 27, 2018 07:56
-
-
Save tranduydat/1b1270a90628a0dff5cf60a4d3dd2e7e to your computer and use it in GitHub Desktop.
.vimrc config
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
call plug#begin('~/.vim/plugged') | |
Plug 'scrooloose/nerdtree' " Files manager. | |
Plug 'nightsense/stellarized' | |
Plug 'itchyny/lightline.vim' | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
call plug#end() | |
"========== General Configs ========== | |
let g:Powerline_symbols = 'fancy' | |
" Enable syntax highlighting | |
syntax enable | |
" Enable line numbers | |
set nu | |
" Enable 256 colors palette in Gnome Terminal | |
if $COLORTERM == 'gnome-terminal' | |
set t_Co=256 | |
endif | |
try | |
" Set colorscheme | |
colorscheme dracula | |
catch | |
endtry | |
set background=dark | |
" Set extra options when running in GUI mode | |
if has("gui_running") | |
set guioptions-=T | |
set guioptions-=e | |
set t_Co=256 | |
set guitablabel=%M\ %t | |
endif | |
" Set utf8 as standard encoding and en_US as the standard language | |
set encoding=utf8 | |
" Use Unix as the standard file type | |
set ffs=unix,dos,mac | |
" Enable mouse control | |
set mouse=a | |
"========== Plugin Config ========== | |
"__________ NERDTree __________ | |
let g:NERDTreeWinPos = "right" | |
let NERDTreeShowHidden=0 | |
let NERDTreeIgnore = ['\.pyc$', '__pycache__'] | |
let g:NERDTreeWinSize=35 | |
map <leader>nn :NERDTreeToggle<cr> | |
map <leader>nb :NERDTreeFromBookmark<Space> | |
map <leader>nf :NERDTreeFind<cr> | |
let g:NERDTreeDirArrowExpandable = '▸' | |
let g:NERDTreeDirArrowCollapsible = '▾' | |
" Let show hidden files | |
let NERDTreeShowHidden=1 | |
" __________ Lightline __________ | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'active': { | |
\ 'left': [ ['mode', 'paste'], | |
\ ['fugitive', 'readonly', 'filename', 'modified'] ], | |
\ 'right': [ [ 'lineinfo' ], ['percent'] ] | |
\ }, | |
\ 'component': { | |
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}', | |
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', | |
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' | |
\ }, | |
\ 'component_visible_condition': { | |
\ 'readonly': '(&filetype!="help"&& &readonly)', | |
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', | |
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' | |
\ }, | |
\ 'separator': { 'left': ' ', 'right': ' ' }, | |
\ 'subseparator': { 'left': ' ', 'right': ' ' } | |
\ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment