-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
109 lines (92 loc) · 2.39 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
set nocompatible
filetype off
set rtp+=/opt/homebrew/opt/fzf
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'godlygeek/tabular'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-commentary'
Plugin 'rking/ag.vim'
Plugin 'morhetz/gruvbox'
Plugin 'tmhedberg/SimpylFold'
Plugin 'junegunn/fzf.vim'
Plugin 'itchyny/lightline.vim'
Plugin 'mustache/vim-mustache-handlebars'
" Python
Plugin 'vim-scripts/indentpython.vim'
Plugin 'davidhalter/jedi-vim'
" Ruby
Plugin 'vim-ruby/vim-ruby'
" Go
Plugin 'fatih/vim-go'
" Elixir
Plugin 'elixir-editors/vim-elixir'
Plugin 'mhinz/vim-mix-format'
call vundle#end()
syntax on
filetype on
filetype indent on
filetype plugin on
set encoding=utf-8
set clipboard=unnamed
set background=dark
colorscheme gruvbox
set nowrap
set textwidth=80 " Margin enforcement
set colorcolumn=+1 " Margin guide
set backspace=indent,eol,start " Backspace over everything
" Editing
set number " Show lines numbers
set cul " Highlight current line for active window
set autoread " Check one time after 4s of inactivity in normal mode
set timeoutlen=1000
set ttimeoutlen=0
set tags=./tags;,tags;
au CursorHold * checktime
" Indentation
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set autoindent
" Nerdtree
let NERDTreeShowHidden=1
let NERDTreeIgnore = ['\.pyc$']
let g:NERDTreeNodeDelimiter = "\u00a0"
map <C-l> :NERDTreeToggle<CR>
" fzf
nnoremap <silent> <C-p> :FZF<CR>
" SimpylFold
set foldlevelstart=99
set foldmethod=indent
let g:SimpylFold_docstring_preview = 1
" lightline
let g:lightline = {
\ 'colorscheme': 'solarized',
\ 'component_function': {
\ 'filename': 'LightlineFilename',
\ }
\ }
function! LightlineFilename()
let root = fnamemodify(get(b:, 'git_dir'), ':h')
let path = expand('%:p')
if path[:len(root)-1] ==# root
return path[len(root)+1:]
endif
return expand('%')
endfunction
" Python
let python_highlight_all=1
let g:python_host_prog = '~/.pyenv/shims/python'
let g:python3_host_prog = '~/.pyenv/shims/python3'
let g:black_virtualenv = '~/.vim/black'
" Ruby
let g:ruby_host_prog = '~/.rbenv/shims/ruby'
" Node.js
let g:node_host_prog = '/opt/homebrew/bin/neovim-node-host'
" Go
let g:go_fmt_command = "goimports"
" Elixir
let g:mix_format_on_save = 1