Last active
March 18, 2019 20:31
-
-
Save jkaldenbach/94c7a3f30fa821b96d74ea3d35771e7c to your computer and use it in GitHub Desktop.
vimrc
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
" dependencies: | |
" neovim | |
" vim-plug | |
" fzf | |
" fd | |
" ack | |
" silver searcher | |
" typescript (npm i -g typescript) | |
" mkdir ~/.vim/undo for persistent undo | |
set number " show line numbers | |
set mouse=a | |
set encoding=utf-8 | |
set background=dark | |
" set indent to 4 spaces default | |
filetype plugin indent on | |
set expandtab | |
set shiftwidth=4 | |
set softtabstop=4 | |
" highlight cursor position by line/column | |
" set cursorcolumn | |
" set cursorline | |
" autocomplete box settings | |
set omnifunc=syntaxcomplete#Complete | |
set completeopt=longest,menuone | |
" fold settings | |
set foldmethod=indent | |
set nofoldenable | |
" search settings: /asdlkjd is case insensitive, /kdTerkjDtlkdsf is case sensitive | |
set ignorecase | |
set smartcase | |
" split opening opens where you expect it to | |
set splitbelow | |
set splitright | |
" auto-update when the file changes outside vim | |
set autowriteall | |
set autoread | |
au FocusGained,BufEnter,CursorHold,CursorHoldI * :checktime | |
set backspace=indent,eol,start " backspace over everything in insert mode | |
" wrap settings | |
set wrap | |
set lbr | |
set breakindent | |
set breakindentopt=shift:2 | |
" these settings allow function signature hints in the echo area | |
set shortmess+=c | |
set noshowmode | |
set cmdheight=2 | |
" when searching, treat '.' as a literal, not as any (:help /magic) | |
set nomagic | |
" persistent undo | |
set undofile | |
set undodir=~/.vim/undo | |
set undolevels=1000 | |
set undoreload=10000 | |
set listchars=tab:→·,trail:≠,nbsp:•,precedes:…,extends:↲ "show whitespace chars | |
set list " Enable display of whitespace chars | |
" if (has("termguicolors")) | |
" set termguicolors | |
" endif | |
" set t_Co=256 | |
" let $NVIM_TUI_ENABLE_TRUE_COLOR=1 | |
let g:oceanic_next_terminal_bold = 1 | |
let g:oceanic_next_terminal_italic = 1 | |
let mapleader = ' ' | |
" keymaps for my own muscle memory | |
inoremap <C-e> <Esc>A | |
inoremap <C-a> <Esc>I | |
inoremap <S-Tab> <Esc>ddO | |
inoremap kj <Esc> | |
nnoremap <Leader>b :Buffers<cr> | |
nnoremap <Leader>F :Ack<space> | |
nnoremap <Leader>p :Files<cr> | |
nnoremap <Leader>e :Explore<cr> | |
" press enter to clear search highlight | |
nnoremap <cr> :noh<CR><CR>:<backspace> | |
" format on paste | |
nnoremap p p=`] | |
nnoremap P P=`] | |
" muscle memory from vscode | |
nnoremap <Leader>\ :NERDTreeToggle<cr> | |
nnoremap <Leader>/ :TComment<cr> | |
" don't screw up splits when closing buffers | |
nnoremap <leader>q :bp<cr>:bd #<cr> | |
command! Bd bp\|bd \# | |
" make < > shifts keep selection | |
vnoremap < <gv | |
vnoremap > >gv | |
" muscle memory from vscode | |
vnoremap <Leader>/ :TComment<cr> | |
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'SirVer/ultisnips' | |
Plug 'w0rp/ale' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'jiangmiao/auto-pairs' | |
" Plug 'ternjs/tern_for_vim', { 'do': 'npm install' } | |
Plug 'tpope/vim-fugitive' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'jkaldenbach/nova-vim' | |
Plug 'jkaldenbach/meow-vim' | |
" Plug 'mhartington/oceanic-next' | |
" Plug 'chriskempson/base16-vim' | |
Plug 'tomtom/tcomment_vim' | |
Plug 'terryma/vim-multiple-cursors' | |
" Plug 'nathanaelkane/vim-indent-guides' | |
" Plug 'Yggdroot/indentLine' | |
Plug 'mileszs/ack.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'zchee/deoplete-jedi' | |
" Plug 'carlitux/deoplete-ternjs' | |
" Plug 'mhartington/nvim-typescript' | |
Plug 'HerringtonDarkholme/yats.vim' | |
" Plug 'Shougo/echodoc.vim' | |
" Plug 'scrooloose/nerdtree' | |
Plug 'severin-lemaignan/vim-minimap' | |
Plug 'mattn/emmet-vim' | |
Plug 'tpope/vim-obsession' | |
call plug#end() | |
" let $FZF_DEFAULT_COMMAND = 'ag -g ""' | |
let g:deoplete#enable_at_startup = 1 | |
" let g:deoplete#omni#functions = {} | |
" let g:deoplete#omni#functions.javascript = ['tern#Complete'] | |
" let g:deoplete#sources['javascript.jsx'] = ['file', 'ultisnips', 'ternjs'] | |
let g:deoplete#sources#jedi#ignore_errors = v:true | |
let g:nvim_typescript#javascript_support = 1 | |
let g:nvim_typescript#signature_complete = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#formatter = 'unique_tail' | |
let g:airline#extensions#tabline#left_sep = ' ' | |
let g:airline#extensions#tabline#left_alt_sep = '| ' | |
let g:airline_theme='lucius' | |
" don't lint so much. save some cpuage | |
let g:ale_enabled = 1 | |
let g:ale_lint_on_text_changed = 0 | |
let g:ale_lint_on_enter = 0 | |
let g:ale_lint_on_save = 1 | |
let g:ale_pattern_options = {'\.py$': {'ale_linters': ['pylint', 'mypy']}} | |
let g:ale_python_pylint_executable = $VIRTUALENV . '/bin/pylint' | |
let g:alle_python_pylint_user_global = 0 | |
let g:ale_pylint_options = '--rcfile ~/.pylintrc' | |
let g:ale_python_mypy_executable = $VIRTUALENV . '/bin/mypy' | |
let g:ale_python_mypy_options = '--config-file ~/mypy.ini' | |
let g:ale_fixers = { 'javascript': ['eslint'] } | |
" use silver searcher for Ack search | |
" let g:ackprg = 'ag --vimgrep' | |
fun! s:search_files(pattern) | |
execute ':silent grep! -rnw "./" -e ".*' . a:pattern . '.*"' | |
endfun | |
command! -nargs=+ Search call s:search_files(<f-args>) | :copen | |
let g:NERDTreeDirArrows=0 | |
let NERDTreeShowHidden=1 | |
let g:NERDTreeWinSize = 60 | |
let g:nerdtree_tabs_open_on_console_startup=1 | |
" let g:indentLine_setColors = 0 | |
" let g:indentLine_char = '┆' | |
let g:user_emmet_mode='in' | |
color meow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment