Created
January 25, 2020 23:47
-
-
Save sikanrong/348da16c526e5ad6e7a588c40a6a8327 to your computer and use it in GitHub Desktop.
My Neovim Configuration
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 " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'icymind/NeoSolarized' | |
Plugin 'noahfrederick/vim-noctu' | |
Plugin 'slashmili/alchemist.vim' | |
Plugin 'Yggdroot/LeaderF' | |
Plugin 'Xuyuanp/nerdtree-git-plugin' | |
Plugin 'elixir-editors/vim-elixir' | |
Plugin 'mileszs/ack.vim' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'Shougo/deoplete.nvim' | |
Plugin 'leafgarland/typescript-vim' | |
Plugin 'ekalinin/dockerfile.vim' | |
Plugin 'ryanoasis/vim-devicons' | |
Plugin 'mhinz/vim-startify' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
syntax enable | |
set background=dark | |
set mouse=a | |
set wildmenu | |
set number | |
colorscheme NeoSolarized | |
" vim-airline | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#show_tabs = 1 | |
let g:airline#extensions#tabline#formatter = 'unique_tail' | |
let g:airline_left_sep = '' | |
let g:airline_left_alt_sep = '' | |
let g:airline_right_sep = '' | |
let g:airline_right_alt_sep = '' | |
let g:airline#extensions#tabline#left_sep = '' | |
let g:airline#extensions#tabline#left_alt_sep = '' | |
let g:airline#extensions#tabline#right_sep = '' | |
let g:airline#extensions#tabline#right_alt_sep = '' | |
" Deoplete | |
let g:deoplete#enable_at_startup = 1 | |
" LeaderF | |
let g:Lf_StlSeparator = { 'left': '', 'right': '' } | |
" Startify | |
let g:startify_session_autoload = 1 | |
" The Silver Searcher | |
if executable('ag') | |
let g:ackprg = 'ag --ignore-dir={app/dist,node_modules} --vimgrep' | |
endif | |
" NERDTree | |
let g:NERDTreeWinPos = "right" | |
" vim-devicons | |
let g:webdevicons_enable_airline_tabline = 1 | |
let g:webdevicons_enable_airline_statusline = 1 | |
let g:webdevicons_enable_startify = 1 | |
let g:webdevicons_conceal_nerdtree_brackets = 1 | |
set clipboard=unnamedplus | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set hidden | |
set termguicolors | |
" Custom functions | |
function! CloseHiddenBuffers() | |
" figure out which buffers are visible in any tab | |
let visible = {} | |
for t in range(1, tabpagenr('$')) | |
for b in tabpagebuflist(t) | |
let visible[b] = 1 | |
endfor | |
endfor | |
" close any buffer that's loaded and not visible | |
for b in range(1, bufnr('$')) | |
if bufloaded(b) && !has_key(visible, b) | |
exe 'bd ' . b | |
endif | |
endfor | |
endfun | |
map <F4> :call CloseHiddenBuffers()<CR> | |
map <F3> :NERDTree<CR> | |
map <F2> :e ~/.vimrc<CR> | |
map <C-space> :Leaderf file<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment