|
|
@ -12,23 +12,13 @@ Plug 'morhetz/gruvbox' |
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'} |
|
|
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } |
|
|
|
Plug 'junegunn/fzf.vim' |
|
|
|
"Plug 'vim-scripts/jcommenter.vim' |
|
|
|
"Plug 'SirVer/ultisnips' |
|
|
|
"Plug 'phux/vim-snippets' |
|
|
|
"Plug 'tobyS/vmustache' |
|
|
|
"Plug 'tobyS/pdv' |
|
|
|
Plug 'Rican7/php-doc-modded' |
|
|
|
Plug 'jreybert/vimagit' |
|
|
|
Plug 'bling/vim-airline' |
|
|
|
Plug 'tpope/vim-commentary' |
|
|
|
Plug 'tpope/vim-fugitive' |
|
|
|
Plug 'rbong/vim-flog' |
|
|
|
Plug 'ap/vim-css-color' |
|
|
|
Plug 'justinmk/vim-sneak' |
|
|
|
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } |
|
|
|
Plug 'darrikonn/vim-gofmt', { 'do': ':GoUpdateBinaries' } |
|
|
|
call plug#end() |
|
|
|
|
|
|
|
let g:airline_powerline_fonts=1 |
|
|
|
|
|
|
|
" Some basics: |
|
|
|
set go=a |
|
|
|
set mouse=a |
|
|
@ -44,14 +34,14 @@ call plug#end() |
|
|
|
set undodir=~/.config/nvim/undodir |
|
|
|
set undofile |
|
|
|
|
|
|
|
let g:gruvbox_contrast_dark = 'hard' |
|
|
|
if exists('+termguicolors') |
|
|
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" |
|
|
|
let &t_8b = "\<Esc>[38;2;%lu;%lu;%lum" |
|
|
|
endif |
|
|
|
let g:gruvbox_invert_selection = '0' |
|
|
|
colorscheme gruvbox |
|
|
|
set background=dark |
|
|
|
"let g:gruvbox_contrast_dark = 'hard' |
|
|
|
"if exists('+termguicolors') |
|
|
|
" let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" |
|
|
|
" let &t_8b = "\<Esc>[38;2;%lu;%lu;%lum" |
|
|
|
"endif |
|
|
|
"let g:gruvbox_invert_selection = '0' |
|
|
|
"colorscheme gruvbox |
|
|
|
"set background=dark |
|
|
|
|
|
|
|
nnoremap c "_c |
|
|
|
set nocompatible |
|
|
@ -98,28 +88,6 @@ call plug#end() |
|
|
|
|
|
|
|
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.5, 'highlight': 'Comment' } } |
|
|
|
|
|
|
|
" php-doc-modded |
|
|
|
nnoremap <C-c> :call PhpDocSingle()<CR>i |
|
|
|
"nnoremap <C-P> :call PhpDocSingle()<CR> |
|
|
|
"vnoremap <C-P> :call PhpDocRange()<CR> |
|
|
|
let g:pdv_cfg_autoEndClass = 0 |
|
|
|
let g:pdv_cfg_autoEndFunction = 0 |
|
|
|
|
|
|
|
" Sneak config |
|
|
|
let g:sneak#label = 1 |
|
|
|
" case insensitive sneak |
|
|
|
let g:sneak#use_ic_scs = 1 |
|
|
|
" immediately move to the next instance of search, if you move the cursor sneak is back to default behavior |
|
|
|
let g:sneak#s_next = 1 |
|
|
|
" remap so I can use , and ; with f and t |
|
|
|
map gS <Plug>Sneak_, |
|
|
|
map gs <Plug>Sneak_; |
|
|
|
" Change the colors |
|
|
|
"highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan |
|
|
|
"highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow |
|
|
|
" Cool prompts |
|
|
|
let g:sneak#prompt = 'S> ' |
|
|
|
|
|
|
|
" Spell-check set to <leader>o, 'o' for 'orthography': |
|
|
|
map <leader>o :setlocal spell! spelllang=en_au<CR> |
|
|
|
|
|
|
@ -139,19 +107,7 @@ call plug#end() |
|
|
|
nnoremap <c-s> :%s//g<Left><Left> |
|
|
|
|
|
|
|
" For chrome extension development |
|
|
|
nnoremap <c-h> :set syntax= |
|
|
|
|
|
|
|
" Ensure files are read as what I want: |
|
|
|
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} |
|
|
|
let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] |
|
|
|
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff |
|
|
|
autocmd BufRead,BufNewFile *.tex set filetype=tex |
|
|
|
|
|
|
|
" Automatically deletes all trailing whitespace on save. |
|
|
|
autocmd BufWritePre * %s/\s\+$//e |
|
|
|
|
|
|
|
" Rebind $ to <leader>d |
|
|
|
nnoremap <leader>d $ |
|
|
|
" nnoremap <c-h> :set syntax= |
|
|
|
|
|
|
|
" Navigating with guides |
|
|
|
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l |
|
|
@ -161,82 +117,9 @@ call plug#end() |
|
|
|
" Remember last cursor position |
|
|
|
autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif |
|
|
|
|
|
|
|
" Update CHANGELOG message |
|
|
|
inoremap <leader>C Update CHANGELOG<esc>:wq<cr> |
|
|
|
inoremap <leader>7 Refactor for php7<esc>bbhi |
|
|
|
|
|
|
|
" Copy entire document |
|
|
|
noremap <leader>y <Esc>ggyG<C-o> |
|
|
|
map <leader>y <Esc>ggyG<C-o> |
|
|
|
|
|
|
|
"""HTML |
|
|
|
autocmd FileType html inoremap <leader>b <b></b><Space><++><Esc>FbT>i |
|
|
|
autocmd FileType html inoremap <leader>it <em></em><Space><++><Esc>FeT>i |
|
|
|
autocmd FileType html inoremap <leader>1 <h1></h1><Enter><Enter><++><Esc>2kf<i |
|
|
|
autocmd FileType html inoremap <leader>2 <h2></h2><Enter><Enter><++><Esc>2kf<i |
|
|
|
autocmd FileType html inoremap <leader>3 <h3></h3><Enter><Enter><++><Esc>2kf<i |
|
|
|
autocmd FileType html inoremap <leader>p <p></p><Enter><Enter><++><Esc>02kf>a |
|
|
|
autocmd FileType html inoremap <leader>a <a<Space>href=""><++></a><Space><++><Esc>14hi |
|
|
|
autocmd FileType html inoremap <leader>e <a<Space>target="_blank"<Space>href=""><++></a><Space><++><Esc>14hi |
|
|
|
autocmd FileType html inoremap <leader>ul <ul><Enter><li></li><Enter></ul><Enter><Enter><++><Esc>03kf<i |
|
|
|
autocmd FileType html inoremap <leader>li <Esc>o<li></li><Esc>F>a |
|
|
|
autocmd FileType html inoremap <leader>ol <ol><Enter><li></li><Enter></ol><Enter><Enter><++><Esc>03kf<i |
|
|
|
autocmd FileType html inoremap <leader>im <img src="" alt="<++>"><++><esc>Fcf"a |
|
|
|
autocmd FileType html inoremap <leader>td <td></td><++><Esc>Fdcit |
|
|
|
autocmd FileType html inoremap <leader>tr <tr></tr><Enter><++><Esc>kf<i |
|
|
|
autocmd FileType html inoremap <leader>th <th></th><++><Esc>Fhcit |
|
|
|
autocmd FileType html inoremap <leader>tab <table><Enter></table><Esc>O |
|
|
|
autocmd FileType html inoremap <leader>gr <font color="green"></font><Esc>F>a |
|
|
|
autocmd FileType html inoremap <leader>rd <font color="red"></font><Esc>F>a |
|
|
|
autocmd FileType html inoremap <leader>yl <font color="yellow"></font><Esc>F>a |
|
|
|
autocmd FileType html inoremap <leader>dt <dt></dt><Enter><dd><++></dd><Enter><++><esc>2kcit |
|
|
|
autocmd FileType html inoremap <leader>dl <dl><Enter><Enter></dl><enter><enter><++><esc>3kcc |
|
|
|
autocmd FileType html inoremap &<space> &<space> |
|
|
|
autocmd FileType html inoremap á á |
|
|
|
autocmd FileType html inoremap é é |
|
|
|
autocmd FileType html inoremap í í |
|
|
|
autocmd FileType html inoremap ó ó |
|
|
|
autocmd FileType html inoremap ú ú |
|
|
|
autocmd FileType html inoremap ä ä |
|
|
|
autocmd FileType html inoremap ë ë |
|
|
|
autocmd FileType html inoremap ï ï |
|
|
|
autocmd FileType html inoremap ö ö |
|
|
|
autocmd FileType html inoremap ü ü |
|
|
|
autocmd FileType html inoremap ã ã |
|
|
|
autocmd FileType html inoremap ẽ &etilde; |
|
|
|
autocmd FileType html inoremap ĩ ĩ |
|
|
|
autocmd FileType html inoremap õ õ |
|
|
|
autocmd FileType html inoremap ũ ũ |
|
|
|
autocmd FileType html inoremap ñ ñ |
|
|
|
autocmd FileType html inoremap à à |
|
|
|
autocmd FileType html inoremap è è |
|
|
|
autocmd FileType html inoremap ì ì |
|
|
|
autocmd FileType html inoremap ò ò |
|
|
|
autocmd FileType html inoremap ù ù |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""MARKDOWN |
|
|
|
" autocmd Filetype markdown,rmd map <leader>w yiWi[<esc>Ea](<esc>pa) |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>n ---<Enter><Enter> |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>b ****<++><Esc>F*hi |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>s ~~~~<++><Esc>F~hi |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>e **<++><Esc>F*i |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>h ====<Space><++><Esc>F=hi |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>i ![](<++>)<++><Esc>F[a |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>a [](<++>)<++><Esc>F[a |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>1 #<Space><Enter><++><Esc>kA |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>2 ##<Space><Enter><++><Esc>kA |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>3 ###<Space><Enter><++><Esc>kA |
|
|
|
" autocmd Filetype markdown,rmd inoremap <leader>l --------<Enter> |
|
|
|
" autocmd Filetype rmd inoremap <leader>r ```{r}<CR>```<CR><CR><esc>2kO |
|
|
|
" autocmd Filetype rmd inoremap <leader>p ```{python}<CR>```<CR><CR><esc>2kO |
|
|
|
" autocmd Filetype rmd inoremap <leader>c ```<cr>```<cr><cr><esc>2kO |
|
|
|
|
|
|
|
""".php |
|
|
|
autocmd FileType php inoremap <leader>f public function <Enter>{<Enter><Tab><++><Enter>}<Esc>kkk$i |
|
|
|
autocmd FileType php inoremap <leader>t $this |
|
|
|
autocmd FileType php inoremap <leader>u use Thirty4\Theme\Form\\<++>;<Esc>5hi |
|
|
|
autocmd FileType php inoremap <leader>s 'url' => [ 'select', [ 'name' => '' ]],<Esc>4hi |
|
|
|
autocmd FileType php inoremap <leader>v var_dump();<CR>die();<Esc>k$hi |
|
|
|
autocmd BufNewFile,BufRead *.gohtml set syntax=html |
|
|
|
|