20 set list listchars=tab:\ \ ,trail:ยท
29 set wildmode=list:longest,list:full
30 set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*
35 " allow backspacing over everything in insert mode
36 set backspace=indent,eol,start
38 " Show (partial) command in the status line
41 " Remember last location in file
43 au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
44 \| exe "normal g'\"" | endif
52 au FileType make set noexpandtab
54 " Thorfile, Rakefile, Vagrantfile and Gemfile are Ruby
55 au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
57 " make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
58 au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
60 " snes syntax highlighting
61 au BufNewFile,BufRead *.asm,*.s set filetype=snes"
63 " load the plugin and indent settings for the detected filetype
64 filetype plugin indent on
67 " Directories for swp files
68 set backupdir=~/.vim/.backup
69 set directory=~/.vim/.backup
72 if filereadable(expand("~/.vimrc.local"))
81 map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
84 " Opens an edit command with the path of the currently edited file filled in
85 " Normal mode: <Leader>e
86 map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
88 " Opens a tab edit command with the path of the currently edited file filled in
89 " Normal mode: <Leader>t
90 map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR>
92 " % to bounce from do to end etc.
93 runtime! macros/matchit.vim
96 highlight Keyword cterm=italic
99 set rtp+=$FZF_VIM_PATH
101 " Inserts the path of the currently edited file into a command
102 noremap <C-P> :FZF <CR>
104 let g:fzf_layout = { 'down': '40%' }
107 let g:AutoPairsMultilineClose = 0
110 let g:ale_linter_aliases = {'svelte': ['css', 'javascript']}
111 let g:ale_linters = {
112 \'javascript': ['eslint'],
113 \'svelte': ['stylelint', 'eslint']
116 \'javascript': ['eslint'],
117 \'svelte': ['eslint']
119 let g:ale_fix_on_save = 1
122 let g:vim_svelte_plugin_use_typescript = 1
125 let g:deoplete#enable_at_startup = 1
126 inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
127 inoremap <expr><S-tab> pumvisible() ? "\<c-p>" : "\<tab>"
130 " A E S T H E T I C S
134 let &colorcolumn="80,150"
136 " Default color scheme
140 " Map colors to vim colors
142 \ { 'fg': ['fg', 'Normal'],
143 \ 'bg': ['bg', 'Normal'],
144 \ 'hl': ['fg', 'Comment'],
145 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
146 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
147 \ 'hl+': ['fg', 'Statement'],
148 \ 'info': ['fg', 'PreProc'],
149 \ 'border': ['fg', 'Ignore'],
150 \ 'prompt': ['fg', 'Conditional'],
151 \ 'pointer': ['fg', 'Exception'],
152 \ 'marker': ['fg', 'Keyword'],
153 \ 'spinner': ['fg', 'Label'],
154 \ 'header': ['fg', 'Comment'] }
161 set foldmethod=syntax
167 autocmd FocusLost * :set norelativenumber
168 autocmd InsertEnter * :set norelativenumber
169 autocmd InsertLeave * :set relativenumber
170 autocmd CursorMoved * :set relativenumber
172 function! NumberToggle()
173 if(&relativenumber == 1)
180 nnoremap <C-n> :call NumberToggle()<cr>
183 " Move things up and down using Ctrl + Shift
184 nnoremap <C-S-j> :m .+1<CR>==
185 nnoremap <C-S-k> :m .-2<CR>==
186 inoremap <C-S-j> <Esc>:m .+1<CR>==gi
187 inoremap <C-S-k> <Esc>:m .-2<CR>==gi
188 vnoremap <C-S-j> :m '>+1<CR>gv=gv
189 vnoremap <C-S-k> :m '<-2<CR>gv=gv
191 " Limelight / Goyo config
193 autocmd! User GoyoEnter Limelight
194 autocmd! User GoyoLeave Limelight!
195 nnoremap <C-S-l> :Limelight!!<CR>==
196 inoremap <C-S-l> <Esc>:Limelight!!<CR>==gi
197 vnoremap <C-S-l> :<C-u>Limelight!!<CR>gv=gv
198 nnoremap <C-S-g> :Goyo<CR>==
199 inoremap <C-S-g> <Esc>:Goyo<CR>==gi
200 vnoremap <C-S-g> :<C-u>Goyo<CR>gv=gv
206 call plug#begin('~/.vim/plugged')
209 Plug 'https://gitlab.com/rbdr/api-notation.vim.git'
211 Plug 'mustache/vim-mode'
212 Plug 'othree/yajs.vim'
213 Plug 'ARM9/snes-syntax-vim'
215 Plug 'leafgarland/typescript-vim'
216 Plug 'leafOfTree/vim-svelte-plugin'
217 Plug 'bumaociyuan/vim-swift'
218 Plug 'udalov/kotlin-vim'
219 Plug 'tikhomirov/vim-glsl'
220 Plug 'jparise/vim-graphql'
221 Plug 'digitaltoad/vim-pug'
222 Plug 'https://git.sr.ht/~torresjrjr/gemini.vim'
223 Plug 'rust-lang/rust.vim'
224 Plug 'dart-lang/dart-vim-plugin'
227 Plug 'tpope/vim-endwise'
228 Plug 'rstacruz/vim-closer'
229 Plug 'michaeljsmith/vim-indent-object'
230 Plug 'editorconfig/editorconfig-vim'
232 " Distraction free editing
233 Plug 'junegunn/goyo.vim'
234 Plug 'junegunn/limelight.vim'
237 Plug 'editorconfig/editorconfig-vim'
238 Plug 'dense-analysis/ale'
239 Plug 'neoclide/coc.nvim', {'branch': 'release'}
240 Plug 'vim-scripts/LargeFile'
241 Plug 'tpope/vim-fugitive'
242 Plug 'milkypostman/vim-togglelist'
243 Plug 'jremmen/vim-ripgrep'
245 " List ends here. Plugins become visible to Vim after this call.