Browse Source

Update dotfiles

master
Tovi Jaeschke-Rogers 4 years ago
parent
commit
aae9e2acad
3 changed files with 13 additions and 131 deletions
  1. +1
    -1
      .config/aliasrc
  2. +12
    -129
      .config/nvim/init.vim
  3. +0
    -1
      .zshrc

+ 1
- 1
.config/aliasrc View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
alias q='exit' \ alias q='exit' \
ls="ls -G" \
ls="ls --color=auto" \
ll="ls -G -alh" \ ll="ls -G -alh" \
dd='sudo dd status=progress' \ dd='sudo dd status=progress' \
h="history 1 | grep" \ h="history 1 | grep" \


+ 12
- 129
.config/nvim/init.vim View File

@ -12,23 +12,13 @@ Plug 'morhetz/gruvbox'
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim' 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 'ap/vim-css-color'
Plug 'justinmk/vim-sneak'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'darrikonn/vim-gofmt', { 'do': ':GoUpdateBinaries' } Plug 'darrikonn/vim-gofmt', { 'do': ':GoUpdateBinaries' }
call plug#end() call plug#end()
let g:airline_powerline_fonts=1
" Some basics: " Some basics:
set go=a set go=a
set mouse=a set mouse=a
@ -44,14 +34,14 @@ call plug#end()
set undodir=~/.config/nvim/undodir set undodir=~/.config/nvim/undodir
set undofile 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 nnoremap c "_c
set nocompatible set nocompatible
@ -98,28 +88,6 @@ call plug#end()
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.5, 'highlight': 'Comment' } } 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': " Spell-check set to <leader>o, 'o' for 'orthography':
map <leader>o :setlocal spell! spelllang=en_au<CR> map <leader>o :setlocal spell! spelllang=en_au<CR>
@ -139,19 +107,7 @@ call plug#end()
nnoremap <c-s> :%s//g<Left><Left> nnoremap <c-s> :%s//g<Left><Left>
" For chrome extension development " 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 " Navigating with guides
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
@ -161,82 +117,9 @@ call plug#end()
" Remember last cursor position " Remember last cursor position
autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif 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 " Copy entire document
noremap <leader>y <Esc>ggyG<C-o> noremap <leader>y <Esc>ggyG<C-o>
map <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> &amp;<space>
autocmd FileType html inoremap á &aacute;
autocmd FileType html inoremap é &eacute;
autocmd FileType html inoremap í &iacute;
autocmd FileType html inoremap ó &oacute;
autocmd FileType html inoremap ú &uacute;
autocmd FileType html inoremap ä &auml;
autocmd FileType html inoremap ë &euml;
autocmd FileType html inoremap ï &iuml;
autocmd FileType html inoremap ö &ouml;
autocmd FileType html inoremap ü &uuml;
autocmd FileType html inoremap ã &atilde;
autocmd FileType html inoremap &etilde;
autocmd FileType html inoremap ĩ &itilde;
autocmd FileType html inoremap õ &otilde;
autocmd FileType html inoremap ũ &utilde;
autocmd FileType html inoremap ñ &ntilde;
autocmd FileType html inoremap à &agrave;
autocmd FileType html inoremap è &egrave;
autocmd FileType html inoremap ì &igrave;
autocmd FileType html inoremap ò &ograve;
autocmd FileType html inoremap ù &ugrave;
""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

+ 0
- 1
.zshrc View File

@ -168,6 +168,5 @@ git-prune() {
fi fi
} }
export PATH="/usr/local/opt/php@7.4/bin:$PATH" export PATH="/usr/local/opt/php@7.4/bin:$PATH"
export PATH="/usr/local/opt/php@7.4/sbin:$PATH" export PATH="/usr/local/opt/php@7.4/sbin:$PATH"

Loading…
Cancel
Save