Created
August 2, 2018 00:15
-
-
Save onlurking/1c66a3aafc8c2c6dae51565ce08ec971 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
" | |
" ███████████████████████████ | |
" ███████▀▀▀░░░░░░░▀▀▀███████ | |
" ████▀░░░░░░░░░░░░░░░░░▀████ | |
" ███│░░░░░░░░░░░░░░░░░░░│███ | |
" ██▌│░░░░░░░░░░░░░░░░░░░│▐██ | |
" ██░└┐░░░░░░░░░░░░░░░░░┌┘░██ | |
" ██░░└┐░░░░░░░░░░░░░░░┌┘░░██ | |
" ██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██ | |
" ██▌░│██████▌░░░▐██████│░▐██ | |
" ███░│▐███▀▀░░▄░░▀▀███▌│░███ | |
" ██▀─┘░░░░░░░▐█▌░░░░░░░└─▀██ | |
" ██▄░░░▄▄▄▓░░▀█▀░░▓▄▄▄░░░▄██ | |
" ████▄─┘██▌░░░░░░░▐██└─▄████ | |
" █████░░▐█─┬┬┬┬┬┬┬─█▌░░█████ | |
" ████▌░░░▀┬┼┼┼┼┼┼┼┬▀░░░▐████ | |
" █████▄░░░└┴┴┴┴┴┴┴┘░░░▄█████ | |
" ███████▄░░░░░░░░░░░▄███████ | |
" ██████████▄▄▄▄▄▄▄██████████ | |
" ███████████████████████████ | |
" | |
" You are about to experience a potent | |
" dosage of Vim. Watch your steps. | |
" | |
" ╔══════════════════════════════════════════╗ | |
" ║ HERE BE VIMPIRES ║ | |
" ╚══════════════════════════════════════════╝ | |
syntax on | |
filetype plugin on | |
colorscheme Tomorrow-Night-Eighties | |
set expandtab | |
set shiftwidth=2 | |
set laststatus=0 | |
set tabstop=2 | |
set shortmess+=afilmnrxoOtT | |
set hidden | |
imap jj <Esc> | |
set number | |
let mapleader="," | |
set listchars=eol:¬,tab:»\ ,trail:~,extends:»,precedes:« | |
hi Normal ctermbg=none | |
call plug#begin('~/.local/share/nvim/plugged') | |
" Autocomplete | |
Plug 'ervandew/supertab' | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
if executable('python') | |
Plug 'zchee/deoplete-jedi' | |
endif | |
" Snippets | |
Plug 'Shougo/neosnippet.vim' | Plug 'Shougo/neosnippet-snippets' | |
Plug 'honza/vim-snippets' | |
if isdirectory('/usr/local/opt/fzf') | |
Plug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim' | |
else | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
endif | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'bronson/vim-trailing-whitespace' | |
Plug 'majutsushi/tagbar' | |
Plug 'Yggdroot/indentLine' | |
" Plug 'w0rp/ale' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'ntpeters/vim-better-whitespace' | |
" Distraction Free | |
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' } | |
Plug 'jiangmiao/auto-pairs' | |
" Syntax Highlight | |
Plug 'sheerun/vim-polyglot' | |
Plug 'vimwiki/vimwiki' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'tpope/vim-fugitive' | |
function! BuildComposer(info) | |
if a:info.status != 'unchanged' || a:info.force | |
if has('nvim') | |
!cargo build --release | |
else | |
!cargo build --release --no-default-features --features json-rpc | |
endif | |
endif | |
endfunction | |
Plug 'euclio/vim-markdown-composer', { 'do': function('BuildComposer') } | |
Plug 'sindresorhus/github-markdown-css', { 'branch': 'gh-pages', 'as': 'github-css' } | |
Plug 'plasticboy/vim-markdown' | |
call plug#end() | |
" Neosnippet | |
imap <C-k> <Plug>(neosnippet_expand_or_jump) | |
smap <C-k> <Plug>(neosnippet_expand_or_jump) | |
xmap <C-k> <Plug>(neosnippet_expand_target) | |
imap <C-k> <Plug>(neosnippet_expand_or_jump) | |
smap <expr><TAB> neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>" | |
if has('conceal') | |
set conceallevel=2 concealcursor=niv | |
endif | |
let g:markdown_composer_custom_css=['file:///home/onlurking/.local/share/nvim/plugged/github-css/github-markdown.css'] | |
let g:markdown_composer_browser = $BROWSER | |
let g:neosnippet#enable_snipmate_compatibility = 1 | |
let g:neosnippet#snippets_directory='~/.vim/plugged/vim-snippets/snippets' | |
" Deoplete | |
let g:deoplete#enable_at_startup = 1 | |
" Disable python 2 | |
let g:loaded_python_provider = 1 | |
let g:vimwiki_list=[{'path': '~/.wiki', 'syntax': 'markdown', 'ext': '.md'}] | |
" vimwiki with markdown support | |
let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} | |
"" fzf.vim | |
set wildmode=list:longest,list:full | |
set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__ | |
let $FZF_DEFAULT_COMMAND = "find * -path '*/\.*' -prune -o -path 'node_modules/**' -prune -o -path 'target/**' -prune -o -path 'dist/**' -prune -o -type f -print -o -type l -print 2> /dev/null" | |
let g:fzf_layout = { 'down': '~40%' } | |
nnoremap <leader>t :Files<CR> | |
nnoremap <leader>b :Buffers<CR> | |
nnoremap <leader>p :History<CR> | |
" [Tags] Command to generate tags file | |
let g:fzf_tags_command = 'ctags -R' | |
" The Silver Searcher | |
if executable('ag') | |
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' | |
set grepprg=ag\ --nogroup\ --nocolor | |
endif | |
" ripgrep | |
if executable('rg') | |
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"' | |
set grepprg=rg\ --vimgrep | |
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0) | |
endif | |
cnoremap <C-P> <C-R>=expand("%:p:h") . "/" <CR> | |
nnoremap <silent> <leader>b :Buffers<CR> | |
nnoremap <silent> <leader>e :FZF -m<CR> | |
"" Git | |
noremap <Leader>ga :Gwrite<CR> | |
noremap <Leader>gc :Gcommit<CR> | |
noremap <Leader>gsh :Gpush<CR> | |
noremap <Leader>gll :Gpull<CR> | |
noremap <Leader>gs :Gstatus<CR> | |
noremap <Leader>gb :Gblame<CR> | |
noremap <Leader>gd :Gvdiff<CR> | |
noremap <Leader>gr :Gremove<CR> | |
"" Set working directory | |
nnoremap <leader>. :lcd %:p:h<CR> | |
" Tagbar | |
nmap <silent> <F2> :TagbarToggle<CR> | |
let g:tagbar_autofocus = 1 | |
"" Copy/Paste/Cut | |
if has('unnamedplus') | |
set clipboard=unnamed,unnamedplus | |
endif | |
" NERDTree | |
" Autoclose vim if NERDTree is only open window | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" /NERDTree |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment