let mapleader ="," if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) echo "Downloading junegunn/vim-plug to manage plugins..." silent !mkdir -p ~/.config/nvim/autoload/ silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim autocmd VimEnter * PlugInstall endif call plug#begin('~/.config/nvim/plugged') 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' call plug#end() " Some basics: set go=a set mouse=a set nohlsearch set clipboard+=unnamedplus set incsearch set smartcase set noswapfile set nobackup set undodir=~/.config/nvim/undodir set undofile colorscheme gruvbox set background=dark nnoremap c "_c set nocompatible filetype plugin on syntax on set encoding=utf-8 set number relativenumber " Indent marks "set listchars=tab:\|_ "set list " Tab 2 spaces filetype plugin indent on set tabstop=2 softtabstop=2 expandtab shiftwidth=2 smarttab " Disables automatic commenting on newline: autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o " coc inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : \ coc#refresh() inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction nmap gd (coc-definition) nmap gr (coc-references) inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " fzf remaps "nnoremap :GFiles nnoremap :GFiles nnoremap :Files " php-doc-modded nnoremap :call PhpDocSingle()i "nnoremap :call PhpDocSingle() "vnoremap :call PhpDocRange() let g:pdv_cfg_autoEndClass = 0 let g:pdv_cfg_autoEndFunction = 0 " Spell-check set to o, 'o' for 'orthography': map o :setlocal spell! spelllang=en_au " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. set splitbelow splitright " Shortcutting split navigation, saving a keypress: " nnoremap h " nnoremap j " nnoremap k " nnoremap l " Check file in shellcheck: map s :!clear && shellcheck % " Replace all is aliased to S. nnoremap S :%s//g " 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 d nnoremap d $ " Navigating with guides inoremap /<++>"_c4l vnoremap /<++>"_c4l map /<++>"_c4l " Remember last cursor position autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif " Update CHANGELOG message inoremap C Update CHANGELOG:wq """HTML autocmd FileType html inoremap b <++>FbT>i autocmd FileType html inoremap it <++>FeT>i autocmd FileType html inoremap 1

<++>2kf2

<++>2kf3

<++>2kfp

<++>02kf>a autocmd FileType html inoremap a href=""><++><++>14hi autocmd FileType html inoremap e target="_blank"href=""><++><++>14hi autocmd FileType html inoremap ul
<++>03kfli o
  • F>a autocmd FileType html inoremap ol
    <++>03kfim <++><++>Fcf"a autocmd FileType html inoremap td <++>Fdcit autocmd FileType html inoremap tr <++>kfth <++>Fhcit autocmd FileType html inoremap tab
    O autocmd FileType html inoremap gr F>a autocmd FileType html inoremap rd F>a autocmd FileType html inoremap yl F>a autocmd FileType html inoremap dt
    <++>
    <++>2kcit autocmd FileType html inoremap dl
    <++>3kcc 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 ã ã 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 w yiWi[Ea](pa) " autocmd Filetype markdown,rmd inoremap n --- " autocmd Filetype markdown,rmd inoremap b ****<++>F*hi " autocmd Filetype markdown,rmd inoremap s ~~~~<++>F~hi " autocmd Filetype markdown,rmd inoremap e **<++>F*i " autocmd Filetype markdown,rmd inoremap h ====<++>F=hi " autocmd Filetype markdown,rmd inoremap i ![](<++>)<++>F[a " autocmd Filetype markdown,rmd inoremap a [](<++>)<++>F[a " autocmd Filetype markdown,rmd inoremap 1 #<++>kA " autocmd Filetype markdown,rmd inoremap 2 ##<++>kA " autocmd Filetype markdown,rmd inoremap 3 ###<++>kA " autocmd Filetype markdown,rmd inoremap l -------- " autocmd Filetype rmd inoremap r ```{r}```2kO " autocmd Filetype rmd inoremap p ```{python}```2kO " autocmd Filetype rmd inoremap c ``````2kO """.php autocmd FileType php inoremap f public function {<++>}kkk$i autocmd FileType php inoremap t $this autocmd FileType php inoremap u use Thirty4\Theme\Form\\<++>;5hi autocmd FileType php inoremap s 'url' => [ 'select', [ 'name' => '' ]],4hi autocmd FileType php inoremap v var_dump();die();k$hi