Created
February 25, 2020 04:58
-
-
Save shadowmaru/5ffe21ff9d8b4f78845170d87fd005e7 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 | |
filetype off | |
set cursorline " highlight current line | |
set synmaxcol=128 | |
set number " show line numbers | |
set noswapfile " doesn't generate those awful .swp files | |
set nobackup " doesn't generate those awful .bkp files | |
set lazyredraw " redraw only when we need to. | |
set showmatch " highlight matching [{()}] | |
set wildignore+=*/tmp/*,*/_build/*,*/node_modules/*,*.so,*.swp,*.zip,*/.git/*,*/coverage/* | |
set wildmenu " visual autocomplete for command menu | |
set expandtab " tabs are spaces | |
set tabstop=2 " number of visual spaces per TAB | |
set softtabstop=2 " number of spaces in tab when editing | |
set autoindent " uses indentation of previous line | |
set foldenable " enable folding | |
set mouse=a " mouse support | |
set whichwrap+=<,>,[,] " allows moving to next/previous lines with left and right arrows | |
" uses vim-plug | |
call plug#begin(stdpath('data') . '/plugged') | |
" Themes | |
" Plug 'gkjgh/cobalt' | |
Plug 'mhartington/oceanic-next' | |
" Interface | |
Plug 'tpope/vim-sensible' " basic config | |
Plug 'preservim/nerdtree' " Explore project | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'airblade/vim-gitgutter' " Git status on left of file | |
Plug 'preservim/nerdcommenter' | |
Plug 'ctrlpvim/ctrlp.vim' " Fuzzy finder by filename | |
Plug 'vim-airline/vim-airline' " Status bar | |
" Plug 'edkolev/tmuxline.vim' " Uses airline to style tmux status - | |
" uncomment when changing theme or preset | |
" Productivity | |
Plug 'cohama/lexima.vim' " Autoclose parenthesis, brackets etc | |
" Language support | |
Plug 'sheerun/vim-polyglot' " Support for many languages | |
Plug 'elixir-editors/vim-elixir' | |
Plug 'mhinz/vim-mix-format' " Should I use ale? | |
Plug 'othree/yajs.vim' | |
Plug 'yuezk/vim-js' | |
Plug 'maxmellon/vim-jsx-pretty' | |
Plug 'ryanoasis/vim-devicons' " Cool icons - always put in last - requires nerd font | |
call plug#end() | |
if (has("termguicolors")) | |
set termguicolors | |
endif | |
" Key mappings | |
" Reload file | |
noremap <c-r> :e!<cr> | |
" move vertically by visual line | |
nnoremap j gj | |
nnoremap k gk | |
" move to beginning/end of line | |
nnoremap <C-a> ^ | |
nnoremap <C-e> $ | |
" CtrlP settings | |
let g:ctrlp_match_window = 'bottom,order:ttb' | |
let g:ctrlp_switch_buffer = 0 | |
let g:ctrlp_working_path_mode = 0 | |
let g:ctrlp_show_hidden = 1 | |
" NERDTree settings | |
nmap <C-n> :NERDTreeToggle<CR> | |
let NERDTreeShowHidden=1 | |
let g:NERDTreeIgnore = ['tmp', '_build', 'deps', '^node_modules$'] | |
" Auto opens NERDTree on open | |
" autocmd VimEnter * NERDTree | |
" autocmd! VimEnter * NERDTree | wincmd w | |
" Auto closes NERDTree on exit | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") | |
\ && b:NERDTree.isTabTree()) | q | endif | |
let g:webdevicons_enable = 1 | |
let g:webdevicons_enable_nerdtree = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
" tmuxline | |
" let g:tmuxline_preset = 'full' | |
" let g:airline#extensions#tmuxline#enabled = 0 | |
" let g:tmuxline_theme = 'iceberg' | |
" NERDComment settings | |
" Add spaces after comment delimiters by default | |
let g:NERDSpaceDelims = 1 | |
" Allow commenting and inverting empty lines (useful when commenting a region) | |
let g:NERDCommentEmptyLines = 1 | |
" Elixir configuration | |
let g:mix_format_on_save = 1 | |
" Theme | |
syntax enable | |
let g:oceanic_next_terminal_bold = 1 | |
let g:oceanic_next_terminal_italic = 1 | |
let g:airline_theme='oceanicnext' | |
colorscheme OceanicNext | |
filetype plugin indent on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment