1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
3 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
5 set number " Show number column
6 set nowrap " Don't wrap text
7 set list " Display tabs and trailing space
8 let &colorcolumn="80,150" " Show color columns
14 " Tab Style (Always override with editorconfig)
15 set tabstop=2 " 2 Spaces per tab
16 set shiftwidth=2 " Spaces used in Autoindent
17 set softtabstop=2 " Spaces used when soft tabbing
18 set expandtab " Always use spaces
20 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
22 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
24 set ignorecase " Ignore case when searching
25 set smartcase " Unless we use both cases in search
27 " Autocomplete Behavior
28 set wildmode=list:longest,list:full " Autocomplete common matching string
29 " first, and then the full match.
32 set foldmethod=syntax " Use syntax highlight to define folds
33 set foldnestmax=10 " Max 10 folds
34 set foldlevelstart=99 " Start with all folds open
36 " Relative Number Behavior
37 autocmd FocusLost * :set norelativenumber
38 autocmd InsertEnter * :set norelativenumber
39 autocmd InsertLeave * :set relativenumber
40 autocmd CursorMoved * :set relativenumber
42 function! NumberToggle()
43 if(&relativenumber == 1)
50 nnoremap <C-n> :call NumberToggle()<cr>
52 " Move lines / blocks up and down using Ctrl + Shift
53 nnoremap <C-S-j> :m .+1<CR>==
54 nnoremap <C-S-k> :m .-2<CR>==
55 inoremap <C-S-j> <Esc>:m .+1<CR>==gi
56 inoremap <C-S-k> <Esc>:m .-2<CR>==gi
57 vnoremap <C-S-j> :m '>+1<CR>gv=gv
58 vnoremap <C-S-k> :m '<-2<CR>gv=gv
60 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
61 " File Specific Behavior
62 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
64 au FileType make set noexpandtab " Makefiles need real tabs
67 au BufNewFile,BufRead *.asm,*.s set filetype=snes"
70 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
72 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
73 if filereadable(expand("~/.init.local.vim"))
74 source ~/.init.local.vim
77 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
78 " Plugin Specific Behavior
79 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
81 set rtp+=$FZF_VIM_PATH " Load FZF vim plugin
82 noremap <C-P> :FZF <CR>
83 let g:fzf_layout = { 'down': '40%' }
85 \ { 'fg': ['fg', 'Normal'],
86 \ 'bg': ['bg', 'Normal'],
87 \ 'hl': ['fg', 'Comment'],
88 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
89 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
90 \ 'hl+': ['fg', 'Statement'],
91 \ 'info': ['fg', 'PreProc'],
92 \ 'border': ['fg', 'Ignore'],
93 \ 'prompt': ['fg', 'Conditional'],
94 \ 'pointer': ['fg', 'Exception'],
95 \ 'marker': ['fg', 'Keyword'],
96 \ 'spinner': ['fg', 'Label'],
97 \ 'header': ['fg', 'Comment'] }
100 let g:vim_svelte_plugin_use_typescript = 1
102 " Limelight / Goyo config
104 let g:limelight_conceal_ctermfg = 'gray'
105 let g:limelight_conceal_guifg = 'DarkGray'
107 autocmd! User GoyoEnter Limelight
108 autocmd! User GoyoLeave Limelight!
109 nnoremap <leader>i :Limelight!!<CR>==
110 inoremap <leader>i <Esc>:Limelight!!<CR>==gi
111 vnoremap <leader>i :<C-u>Limelight!!<CR>gv=gv
112 nnoremap <leader>g :Goyo<CR>==
113 inoremap <leader>g <Esc>:Goyo<CR>==gi
114 vnoremap <leader>g :<C-u>Goyo<CR>gv=gv