dotfiles

My dotfiles for Arch Linux
git clone git://git.janispagel.de/dotfiles.git
Log | Files | Refs | README

commit ea5f37dc11151ece642744343f7115681ba1f5b2
parent 6d3088c7d03dd7ec7b3791ec72e84f44c57a01a8
Author: Janis Pagel <janis.pagel@ims.uni-stuttgart.de>
Date:   Wed,  7 Oct 2020 23:07:08 +0200

Move vim config files

Diffstat:
Mnvim/.config/nvim/autoload | 4++--
Mnvim/.config/nvim/colors | 4++--
Mnvim/.config/nvim/ftdetect | 4++--
Mnvim/.config/nvim/ftplugin | 4++--
Mnvim/.config/nvim/init.vim | 4++--
Mnvim/.config/nvim/snippets | 4++--
Rvim/.vim/autoload/plug.vim -> vim/.config/vim/autoload/plug.vim | 0
Rvim/.vim/colors/obsidian.vim -> vim/.config/vim/colors/obsidian.vim | 0
Rvim/.vim/colors/solarized.vim -> vim/.config/vim/colors/solarized.vim | 0
Rvim/.vim/colors/true-green.vim -> vim/.config/vim/colors/true-green.vim | 0
Rvim/.vim/colors/true-monochrome.vim -> vim/.config/vim/colors/true-monochrome.vim | 0
Rvim/.vim/ftdetect/csv.vim -> vim/.config/vim/ftdetect/csv.vim | 0
Rvim/.vim/ftdetect/markdown.vim -> vim/.config/vim/ftdetect/markdown.vim | 0
Rvim/.vim/ftdetect/tex.vim -> vim/.config/vim/ftdetect/tex.vim | 0
Rvim/.vim/ftdetect/text.vim -> vim/.config/vim/ftdetect/text.vim | 0
Rvim/.vim/ftdetect/tsv.vim -> vim/.config/vim/ftdetect/tsv.vim | 0
Rvim/.vim/ftplugin/csv.vim -> vim/.config/vim/ftplugin/csv.vim | 0
Rvim/.vim/ftplugin/html.vim -> vim/.config/vim/ftplugin/html.vim | 0
Rvim/.vim/ftplugin/markdown.vim -> vim/.config/vim/ftplugin/markdown.vim | 0
Rvim/.vim/ftplugin/python.vim -> vim/.config/vim/ftplugin/python.vim | 0
Rvim/.vim/ftplugin/tex.vim -> vim/.config/vim/ftplugin/tex.vim | 0
Rvim/.vim/ftplugin/text.vim -> vim/.config/vim/ftplugin/text.vim | 0
Rvim/.vim/ftplugin/tsv.vim -> vim/.config/vim/ftplugin/tsv.vim | 0
Rvim/.vim/ftplugin/vim.vim -> vim/.config/vim/ftplugin/vim.vim | 0
Rvim/.vim/ftplugin/vimwiki.vim -> vim/.config/vim/ftplugin/vimwiki.vim | 0
Rvim/.vim/snippets/bibtex/skel_article.bib -> vim/.config/vim/snippets/bibtex/skel_article.bib | 0
Rvim/.vim/snippets/bibtex/skel_book.bib -> vim/.config/vim/snippets/bibtex/skel_book.bib | 0
Rvim/.vim/snippets/bibtex/skel_inproceedings.bib -> vim/.config/vim/snippets/bibtex/skel_inproceedings.bib | 0
Rvim/.vim/snippets/latex/skel_enumerate.tex -> vim/.config/vim/snippets/latex/skel_enumerate.tex | 0
Rvim/.vim/snippets/latex/skel_figure.tex -> vim/.config/vim/snippets/latex/skel_figure.tex | 0
Rvim/.vim/snippets/latex/skel_frame.tex -> vim/.config/vim/snippets/latex/skel_frame.tex | 0
Rvim/.vim/snippets/latex/skel_itemize.tex -> vim/.config/vim/snippets/latex/skel_itemize.tex | 0
Rvim/.vim/snippets/latex/skel_outline.tex -> vim/.config/vim/snippets/latex/skel_outline.tex | 0
Rvim/.vim/snippets/markdown/skel_codeblock.md -> vim/.config/vim/snippets/markdown/skel_codeblock.md | 0
Rvim/.vim/snippets/markdown/skel_image.md -> vim/.config/vim/snippets/markdown/skel_image.md | 0
Rvim/.vim/snippets/markdown/skel_link.md -> vim/.config/vim/snippets/markdown/skel_link.md | 0
Rvim/.vim/snippets/markdown/skel_meta.md -> vim/.config/vim/snippets/markdown/skel_meta.md | 0
Rvim/.vim/snippets/markdown/skel_table.md -> vim/.config/vim/snippets/markdown/skel_table.md | 0
Rvim/.vim/snippets/python/skel_class.py -> vim/.config/vim/snippets/python/skel_class.py | 0
Rvim/.vim/snippets/python/skel_func.py -> vim/.config/vim/snippets/python/skel_func.py | 0
Avim/.config/vim/vimrc | 217+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dvim/dot-vimrc | 208-------------------------------------------------------------------------------
Mzsh/dot-zshenv | 5+++--
43 files changed, 232 insertions(+), 222 deletions(-)

diff --git a/nvim/.config/nvim/autoload b/nvim/.config/nvim/autoload @@ -1 +1 @@ -../../../vim/.vim/autoload- \ No newline at end of file +../../../vim/.config/vim/autoload+ \ No newline at end of file diff --git a/nvim/.config/nvim/colors b/nvim/.config/nvim/colors @@ -1 +1 @@ -../../../vim/.vim/colors- \ No newline at end of file +../../../vim/.config/vim/colors+ \ No newline at end of file diff --git a/nvim/.config/nvim/ftdetect b/nvim/.config/nvim/ftdetect @@ -1 +1 @@ -../../../vim/.vim/ftdetect- \ No newline at end of file +../../../vim/.config/vim/ftdetect+ \ No newline at end of file diff --git a/nvim/.config/nvim/ftplugin b/nvim/.config/nvim/ftplugin @@ -1 +1 @@ -../../../vim/.vim/ftplugin- \ No newline at end of file +../../../vim/.config/vim/ftplugin+ \ No newline at end of file diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim @@ -1 +1 @@ -../../../vim/dot-vimrc- \ No newline at end of file +../../../vim/.config/vim/vimrc+ \ No newline at end of file diff --git a/nvim/.config/nvim/snippets b/nvim/.config/nvim/snippets @@ -1 +1 @@ -../../../vim/.vim/snippets- \ No newline at end of file +../../../vim/.config/vim/snippets+ \ No newline at end of file diff --git a/vim/.vim/autoload/plug.vim b/vim/.config/vim/autoload/plug.vim diff --git a/vim/.vim/colors/obsidian.vim b/vim/.config/vim/colors/obsidian.vim diff --git a/vim/.vim/colors/solarized.vim b/vim/.config/vim/colors/solarized.vim diff --git a/vim/.vim/colors/true-green.vim b/vim/.config/vim/colors/true-green.vim diff --git a/vim/.vim/colors/true-monochrome.vim b/vim/.config/vim/colors/true-monochrome.vim diff --git a/vim/.vim/ftdetect/csv.vim b/vim/.config/vim/ftdetect/csv.vim diff --git a/vim/.vim/ftdetect/markdown.vim b/vim/.config/vim/ftdetect/markdown.vim diff --git a/vim/.vim/ftdetect/tex.vim b/vim/.config/vim/ftdetect/tex.vim diff --git a/vim/.vim/ftdetect/text.vim b/vim/.config/vim/ftdetect/text.vim diff --git a/vim/.vim/ftdetect/tsv.vim b/vim/.config/vim/ftdetect/tsv.vim diff --git a/vim/.vim/ftplugin/csv.vim b/vim/.config/vim/ftplugin/csv.vim diff --git a/vim/.vim/ftplugin/html.vim b/vim/.config/vim/ftplugin/html.vim diff --git a/vim/.vim/ftplugin/markdown.vim b/vim/.config/vim/ftplugin/markdown.vim diff --git a/vim/.vim/ftplugin/python.vim b/vim/.config/vim/ftplugin/python.vim diff --git a/vim/.vim/ftplugin/tex.vim b/vim/.config/vim/ftplugin/tex.vim diff --git a/vim/.vim/ftplugin/text.vim b/vim/.config/vim/ftplugin/text.vim diff --git a/vim/.vim/ftplugin/tsv.vim b/vim/.config/vim/ftplugin/tsv.vim diff --git a/vim/.vim/ftplugin/vim.vim b/vim/.config/vim/ftplugin/vim.vim diff --git a/vim/.vim/ftplugin/vimwiki.vim b/vim/.config/vim/ftplugin/vimwiki.vim diff --git a/vim/.vim/snippets/bibtex/skel_article.bib b/vim/.config/vim/snippets/bibtex/skel_article.bib diff --git a/vim/.vim/snippets/bibtex/skel_book.bib b/vim/.config/vim/snippets/bibtex/skel_book.bib diff --git a/vim/.vim/snippets/bibtex/skel_inproceedings.bib b/vim/.config/vim/snippets/bibtex/skel_inproceedings.bib diff --git a/vim/.vim/snippets/latex/skel_enumerate.tex b/vim/.config/vim/snippets/latex/skel_enumerate.tex diff --git a/vim/.vim/snippets/latex/skel_figure.tex b/vim/.config/vim/snippets/latex/skel_figure.tex diff --git a/vim/.vim/snippets/latex/skel_frame.tex b/vim/.config/vim/snippets/latex/skel_frame.tex diff --git a/vim/.vim/snippets/latex/skel_itemize.tex b/vim/.config/vim/snippets/latex/skel_itemize.tex diff --git a/vim/.vim/snippets/latex/skel_outline.tex b/vim/.config/vim/snippets/latex/skel_outline.tex diff --git a/vim/.vim/snippets/markdown/skel_codeblock.md b/vim/.config/vim/snippets/markdown/skel_codeblock.md diff --git a/vim/.vim/snippets/markdown/skel_image.md b/vim/.config/vim/snippets/markdown/skel_image.md diff --git a/vim/.vim/snippets/markdown/skel_link.md b/vim/.config/vim/snippets/markdown/skel_link.md diff --git a/vim/.vim/snippets/markdown/skel_meta.md b/vim/.config/vim/snippets/markdown/skel_meta.md diff --git a/vim/.vim/snippets/markdown/skel_table.md b/vim/.config/vim/snippets/markdown/skel_table.md diff --git a/vim/.vim/snippets/python/skel_class.py b/vim/.config/vim/snippets/python/skel_class.py diff --git a/vim/.vim/snippets/python/skel_func.py b/vim/.config/vim/snippets/python/skel_func.py diff --git a/vim/.config/vim/vimrc b/vim/.config/vim/vimrc @@ -0,0 +1,217 @@ +" Default Dirs {{{ +set undodir=$XDG_DATA_HOME/vim/undo +set directory=$XDG_DATA_HOME/vim/swap +set backupdir=$XDG_DATA_HOME/vim/backup +set viewdir=$XDG_DATA_HOME/vim/view +set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo +set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CONFIG_HOME/vim/after,$VIM,$VIMRUNTIME +" }}} + +" Plugins {{{ +call plug#begin('$XDG_CONFIG_HOME/vim/plugged') +Plug 'easymotion/vim-easymotion' +Plug 'vimwiki/vimwiki' +Plug 'mechatroner/rainbow_csv' + +"Coding +Plug 'dense-analysis/ale' +Plug 'Raimondi/delimitMate' + +" Search +Plug 'wincent/command-t', { + \ 'do': 'cd ruby/command-t/ext/command-t && ruby extconf.rb && make' + \ } +Plug 'justinmk/vim-sneak' + +" Sorting +Plug 'chiedo/vim-sort-blocks-by' + +" Writing text +Plug 'junegunn/goyo.vim' + +" Themes +Plug 'arcticicestudio/nord-vim' +Plug 'morhetz/gruvbox' + +Plug 'tpope/vim-surround' +Plug 'tpope/vim-repeat' +Plug 'camspiers/lens.vim' +Plug 'jlanzarotta/bufexplorer' + +" R Setup +"Plug 'jalvesaq/Nvim-R' +"Plug 'ncm2/ncm2' +"Plug 'roxma/nvim-yarp' +"Plug 'gaalcaras/ncm-R' +if !has('nvim') + Plug 'roxma/vim-hug-neovim-rpc' +endif + +" Python +"Plug 'ncm2/ncm2-jedi' +call plug#end() +if has("autocmd") + filetype plugin indent on +endif + +" Configure vim-sneak +map f <Plug>Sneak_s +map F <Plug>Sneak_S + +" Configure NCM2 +"autocmd BufEnter * call ncm2#enable_for_buffer() " To enable ncm2 for all buffers. +"set completeopt=noinsert,menuone,noselect " :help Ncm2PopupOpen for more + + " }}} + +" Basics {{{ +set encoding=utf-8 " Encoding +set number " Display line numbers +set relativenumber " Enable relative line numbers +set splitbelow splitright " Sensible splitting behavior +set nocompatible +set nomodeline +set cursorline +set clipboard+=unnamedplus " Yank and Paste directly to and from clipboard +" Enable file autocompletion and fuzzy find +set wildmode=longest,list,full +set wildmenu +set path+=** +" Change leader key +let mapleader = ',' +" Set the time the leader key is active (in ms) +set timeoutlen=2000 +" Show tabs +set listchars=tab:>- +" Leave insert mode +inoremap jk <ESC> + " }}} + +" Syntax highlighting {{{ +let g:solarized_termcolors=256 " If using solarized color scheme +let g:gruvbox_contrast_dark="soft" " If using gruvbox color scheme +let g:gruvbox_contrast_light="hard" +if has("syntax") + syntax on + colorscheme nord +endif +" }}} + +" Statusline {{{ +set laststatus=2 +set statusline= +"set statusline+=%7*\[%n] "buffernr +set statusline+=%1*\ %<%F\ "Filename +set statusline+=%2*\ %y\ "FileType +set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding +set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2 +set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..) +set statusline+=%5*\ %{&spelllang}\ "Spellanguage +set statusline+=%8*\ %=\ %l:%v\ "Rownr:Colnr +set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot. + " }}} + +" Snippets {{{ +" Python +nnoremap <Leader>pydef :-1read $XDG_CONFIG_HOME/vim/snippets/python/skel_func.py<CR>wf(a +nnoremap <Leader>pyclass :-1read $XDG_CONFIG_HOME/vim/snippets/python/skel_class.py<CR>wi +" LaTeX +nnoremap <Leader>item :-1read $XDG_CONFIG_HOME/vim/snippets/latex/skel_itemize.tex<CR>1j$i +nnoremap <Leader>enum :-1read $XDG_CONFIG_HOME/vim/snippets/latex/skel_enumerate.tex<CR>1j$i +nnoremap <Leader>fig :-1read $XDG_CONFIG_HOME/vim/snippets/latex/skel_figure.tex<CR>1j$i +nnoremap <Leader>frame :-1read $XDG_CONFIG_HOME/vim/snippets/latex/skel_frame.tex<CR>f{f{a +nnoremap <Leader>outline :-1read $XDG_CONFIG_HOME/vim/snippets/latex/skel_outline.tex<CR>1j$i +" Markdown +nnoremap <Leader>mdtab :-1read $XDG_CONFIG_HOME/vim/snippets/markdown/skel_table.md<CR>2li +nnoremap <Leader>mdimg :-1read $XDG_CONFIG_HOME/vim/snippets/markdown/skel_image.md<CR>f[a +nnoremap <Leader>mdlink :-1read $XDG_CONFIG_HOME/vim/snippets/markdown/skel_link.md<CR>f[a +nnoremap <Leader>mdblock :-1read $XDG_CONFIG_HOME/vim/snippets/markdown/skel_codeblock.md<CR>$i +nnoremap <Leader>mdmeta :-1read $XDG_CONFIG_HOME/vim/snippets/markdown/skel_meta.md<CR>3j$"=strftime("%Y-%m-%d")<CR>Pgg01j$i +" Bibtex +nnoremap <Leader>bibbook :-1read $XDG_CONFIG_HOME/vim/snippets/bibtex/skel_book.bib<CR>f{a +nnoremap <Leader>bibinp :-1read $XDG_CONFIG_HOME/vim/snippets/bibtex/skel_inproceedings.bib<CR>f{a +nnoremap <Leader>bibart :-1read $XDG_CONFIG_HOME/vim/snippets/bibtex/skel_article.bib<CR>f{a +" }}} + +" run programs silently {{{ +command! -nargs=* RunSilent + \ | execute ':silent !'.'<args>' + \ | execute ':redraw!' +" }}} + +" markdown preview with pandoc {{{ +nmap <Leader>pc :RunSilent pandoc -f markdown -o /tmp/vim-pandoc-out.pdf % && pkill -1 mupdf<CR> +nmap <Leader>pp :RunSilent zathura /tmp/vim-pandoc-out.pdf &<CR> + " }}} + +" Search through vimwiki {{{ +command! -nargs=1 Wikigrep vimgrep "<args>" $HOME/vimwiki/**/*.wiki +nnoremap <Leader>w :Wikigrep<space> +" }}} + +" run make {{{ +nmap <Leader>mk :RunSilent make<CR> +"}}} + +" Normal, write and code modes {{{ +command Normalmode set background=dark | colorscheme nord | Goyo! | set nolinebreak | set norelativenumber | set nospell | set cursorline +command Writemode set background=light | colorscheme solarized | set linebreak | set spell | set nocursorline | Goyo 80 +command Codemode set background=dark | colorscheme obsidian | Goyo! | set nolinebreak | set nospell | set cursorline +nmap <Leader>nm :Normalmode<CR> +nmap <Leader>wm :Writemode<CR> +nmap <Leader>cm :Codemode<CR> +" }}} + +" Insert current date {{{ +nmap <Leader>d "=strftime("%Y-%m-%d")<CR>P +" }}} + +" Commands {{{ +" Requires ctags to be installed +command! MakeTags !ctags -R . +command! Make !make +nnoremap <Leader>m :Make<CR> +" }}} + +" autocmds {{{ +" reopening a file at same position +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + autocmd BufRead,BufNewFile ~/.mutt/temp/mutt* :Goyo 80 | set linebreak | set spell + " automatically deletes all trailing whitespace on save + " autocmd BufWritePre * %s/\s\+$//e +endif + +" Use specific colorscheme for buffer if b:colors_name is set +au BufEnter * if (exists("b:colors_name")) | let b:current_colors=colors_name + \| execute "colorscheme " . b:colors_name | endif +au BufLeave * if (exists("b:current_colors")) | execute "colorscheme " . b:current_colors | endif +" }}} + +" Open vimrc {{{ +noremap <Leader>ev :vsp $XDG_CONFIG_HOME/vim/vimrc<CR> +nnoremap <Leader>sv :source $XDG_CONFIG_HOME/vim/vimrc <bar> :doautocmd BufRead<CR> +" }}} + +" Disable arrow and page keys {{{ +noremap <Down> <Nop> +noremap <Left> <Nop> +noremap <Right> <Nop> +noremap <Up> <Nop> +noremap <PageUp> <Nop> +noremap <PageDown> <Nop> +noremap! <Down> <Nop> +noremap! <Left> <Nop> +noremap! <Right> <Nop> +noremap! <Up> <Nop> +noremap! <PageUp> <Nop> +noremap! <PageDown> <Nop> +" }}} + +" Folding {{{ +set foldenable +set foldlevelstart=10 +set foldnestmax=10 +set foldmethod=syntax +nnoremap <space> za +" }}} diff --git a/vim/dot-vimrc b/vim/dot-vimrc @@ -1,208 +0,0 @@ -" Plugins {{{ -call plug#begin('~/.vim/plugged') -Plug 'easymotion/vim-easymotion' -Plug 'vimwiki/vimwiki' -Plug 'mechatroner/rainbow_csv' - -"Coding -Plug 'dense-analysis/ale' -Plug 'Raimondi/delimitMate' - -" Search -Plug 'wincent/command-t', { - \ 'do': 'cd ruby/command-t/ext/command-t && ruby extconf.rb && make' - \ } -Plug 'justinmk/vim-sneak' - -" Sorting -Plug 'chiedo/vim-sort-blocks-by' - -" Writing text -Plug 'junegunn/goyo.vim' - -" Themes -Plug 'arcticicestudio/nord-vim' -Plug 'morhetz/gruvbox' - -Plug 'tpope/vim-surround' -Plug 'tpope/vim-repeat' -Plug 'camspiers/lens.vim' -Plug 'jlanzarotta/bufexplorer' - -" R Setup -"Plug 'jalvesaq/Nvim-R' -"Plug 'ncm2/ncm2' -"Plug 'roxma/nvim-yarp' -"Plug 'gaalcaras/ncm-R' -if !has('nvim') - Plug 'roxma/vim-hug-neovim-rpc' -endif - -" Python -"Plug 'ncm2/ncm2-jedi' -call plug#end() -if has("autocmd") - filetype plugin indent on -endif - -" Configure vim-sneak -map f <Plug>Sneak_s -map F <Plug>Sneak_S - -" Configure NCM2 -"autocmd BufEnter * call ncm2#enable_for_buffer() " To enable ncm2 for all buffers. -"set completeopt=noinsert,menuone,noselect " :help Ncm2PopupOpen for more - - " }}} - -" Basics {{{ -set encoding=utf-8 " Encoding -set number " Display line numbers -set relativenumber " Enable relative line numbers -set splitbelow splitright " Sensible splitting behavior -set nocompatible -set nomodeline -set cursorline -set clipboard+=unnamedplus " Yank and Paste directly to and from clipboard -" Enable file autocompletion and fuzzy find -set wildmode=longest,list,full -set wildmenu -set path+=** -" Change leader key -let mapleader = ',' -" Set the time the leader key is active (in ms) -set timeoutlen=2000 -" Show tabs -set listchars=tab:>- -" Leave insert mode -inoremap jk <ESC> - " }}} - -" Syntax highlighting {{{ -let g:solarized_termcolors=256 " If using solarized color scheme -let g:gruvbox_contrast_dark="soft" " If using gruvbox color scheme -let g:gruvbox_contrast_light="hard" -if has("syntax") - syntax on - colorscheme nord -endif -" }}} - -" Statusline {{{ -set laststatus=2 -set statusline= -"set statusline+=%7*\[%n] "buffernr -set statusline+=%1*\ %<%F\ "Filename -set statusline+=%2*\ %y\ "FileType -set statusline+=%3*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding -set statusline+=%3*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2 -set statusline+=%4*\ %{&ff}\ "FileFormat (dos/unix..) -set statusline+=%5*\ %{&spelllang}\ "Spellanguage -set statusline+=%8*\ %=\ %l:%v\ "Rownr:Colnr -set statusline+=%0*\ \ %m%r%w\ %P\ \ "Modified? Readonly? Top/bot. - " }}} - -" Snippets {{{ -" Python -nnoremap <Leader>pydef :-1read $HOME/.vim/snippets/python/skel_func.py<CR>wf(a -nnoremap <Leader>pyclass :-1read $HOME/.vim/snippets/python/skel_class.py<CR>wi -" LaTeX -nnoremap <Leader>item :-1read $HOME/.vim/snippets/latex/skel_itemize.tex<CR>1j$i -nnoremap <Leader>enum :-1read $HOME/.vim/snippets/latex/skel_enumerate.tex<CR>1j$i -nnoremap <Leader>fig :-1read $HOME/.vim/snippets/latex/skel_figure.tex<CR>1j$i -nnoremap <Leader>frame :-1read $HOME/.vim/snippets/latex/skel_frame.tex<CR>f{f{a -nnoremap <Leader>outline :-1read $HOME/.vim/snippets/latex/skel_outline.tex<CR>1j$i -" Markdown -nnoremap <Leader>mdtab :-1read $HOME/.vim/snippets/markdown/skel_table.md<CR>2li -nnoremap <Leader>mdimg :-1read $HOME/.vim/snippets/markdown/skel_image.md<CR>f[a -nnoremap <Leader>mdlink :-1read $HOME/.vim/snippets/markdown/skel_link.md<CR>f[a -nnoremap <Leader>mdblock :-1read $HOME/.vim/snippets/markdown/skel_codeblock.md<CR>$i -nnoremap <Leader>mdmeta :-1read $HOME/.vim/snippets/markdown/skel_meta.md<CR>3j$"=strftime("%Y-%m-%d")<CR>Pgg01j$i -" Bibtex -nnoremap <Leader>bibbook :-1read $HOME/.vim/snippets/bibtex/skel_book.bib<CR>f{a -nnoremap <Leader>bibinp :-1read $HOME/.vim/snippets/bibtex/skel_inproceedings.bib<CR>f{a -nnoremap <Leader>bibart :-1read $HOME/.vim/snippets/bibtex/skel_article.bib<CR>f{a -" }}} - -" run programs silently {{{ -command! -nargs=* RunSilent - \ | execute ':silent !'.'<args>' - \ | execute ':redraw!' -" }}} - -" markdown preview with pandoc {{{ -nmap <Leader>pc :RunSilent pandoc -f markdown -o /tmp/vim-pandoc-out.pdf % && pkill -1 mupdf<CR> -nmap <Leader>pp :RunSilent zathura /tmp/vim-pandoc-out.pdf &<CR> - " }}} - -" Search through vimwiki {{{ -command! -nargs=1 Wikigrep vimgrep "<args>" $HOME/vimwiki/**/*.wiki -nnoremap <Leader>w :Wikigrep<space> -" }}} - -" run make {{{ -nmap <Leader>mk :RunSilent make<CR> -"}}} - -" Normal, write and code modes {{{ -command Normalmode set background=dark | colorscheme nord | Goyo! | set nolinebreak | set norelativenumber | set nospell | set cursorline -command Writemode set background=light | colorscheme solarized | set linebreak | set spell | set nocursorline | Goyo 80 -command Codemode set background=dark | colorscheme obsidian | Goyo! | set nolinebreak | set nospell | set cursorline -nmap <Leader>nm :Normalmode<CR> -nmap <Leader>wm :Writemode<CR> -nmap <Leader>cm :Codemode<CR> -" }}} - -" Insert current date {{{ -nmap <Leader>d "=strftime("%Y-%m-%d")<CR>P -" }}} - -" Commands {{{ -" Requires ctags to be installed -command! MakeTags !ctags -R . -command! Make !make -nnoremap <Leader>m :Make<CR> -" }}} - -" autocmds {{{ -" reopening a file at same position -if has("autocmd") - au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif - autocmd BufRead,BufNewFile ~/.mutt/temp/mutt* :Goyo 80 | set linebreak | set spell - " automatically deletes all trailing whitespace on save - " autocmd BufWritePre * %s/\s\+$//e -endif - -" Use specific colorscheme for buffer if b:colors_name is set -au BufEnter * if (exists("b:colors_name")) | let b:current_colors=colors_name - \| execute "colorscheme " . b:colors_name | endif -au BufLeave * if (exists("b:current_colors")) | execute "colorscheme " . b:current_colors | endif -" }}} - -" Open vimrc {{{ -nnoremap <Leader>ev :vsp ~/.vimrc<CR> -nnoremap <Leader>sv :source ~/.vimrc <bar> :doautocmd BufRead<CR> -" }}} - -" Disable arrow and page keys {{{ -noremap <Down> <Nop> -noremap <Left> <Nop> -noremap <Right> <Nop> -noremap <Up> <Nop> -noremap <PageUp> <Nop> -noremap <PageDown> <Nop> -noremap! <Down> <Nop> -noremap! <Left> <Nop> -noremap! <Right> <Nop> -noremap! <Up> <Nop> -noremap! <PageUp> <Nop> -noremap! <PageDown> <Nop> -" }}} - -" Folding {{{ -set foldenable -set foldlevelstart=10 -set foldnestmax=10 -set foldmethod=syntax -nnoremap <space> za -" }}} diff --git a/zsh/dot-zshenv b/zsh/dot-zshenv @@ -15,8 +15,8 @@ export XDG_CACHE_HOME=$HOME/.cache export XDG_DATA_HOME=$HOME/.local/share # set default programs -export EDITOR="vim" -export VISUAL="vim" +export EDITOR="nvim" +export VISUAL="nvim" export PAGER="less" export TERMINAL="st" export BROWSER="firefox-nightly" @@ -28,5 +28,6 @@ export RSSREADER="newsboat" # Program-specific variables export ZDOTDIR=$XDG_CONFIG_HOME/zsh +export VIMINIT='source "$XDG_CONFIG_HOME/vim/vimrc"' export WEECHAT_HOME=$XDG_CONFIG_HOME/weechat # weechat export IMAPFILTER_HOME=$XDG_CONFIG_HOME/imapfilter # imapfilter