dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 048c5deaf29320c06923ab8a45c9d447226eedb2
parent e88752b1ceeceb13b7952872577cda0eaa60fe96
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Wed,  6 Sep 2017 12:46:58 -0400

improve appearance and functionality with tex files

Diffstat:
A.vim/filetypes.vim | 27+++++++++++++++++++++++++++
M.vim/plugins.vim | 2++
M.vimrc | 16+---------------
3 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/.vim/filetypes.vim b/.vim/filetypes.vim @@ -0,0 +1,27 @@ +" set file type for unrecognized extensions +autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino +autocmd! BufNewFile,BufRead *.ino setlocal ft=arduino +autocmd! BufNewFile,BufRead *.cuh setlocal ft=cuda + +" enable spell and settings for text writing by default for certain file types +autocmd FileType tex,latex,md,rst,mail + \ call pencil#init({'wrap': 'soft', 'textwidth': 80, 'conceallevel': 3}) + \ | call litecorrect#init() + \ | setl spell spl=en_us + \ | setl fdo+=search + \ | setl nocursorcolumn + \ | setl list + "\ | setl spell spl=en_us noru nonu nornu + "\ | let b:dispatch = 'sh /usr/local/bin/preview %:p' +" +" customize what is concealed in LaTeX documents: +" a = conceal accents/ligatures +" d = conceal delimiters +" g = conceal Greek +" m = conceal math symbols +" s = conceal superscripts/subscripts +let g:tex_conceal="agm" + + + + diff --git a/.vim/plugins.vim b/.vim/plugins.vim @@ -47,6 +47,8 @@ Plug 'MattesGroeger/vim-bookmarks' Plug 'tpope/vim-surround' Plug 'tpope/vim-speeddating' " increment dates and times with C-a and C-x Plug 'junegunn/vim-easy-align' " align in columns (select > return > space) +Plug 'reedes/vim-pencil' +Plug 'reedes/vim-litecorrect' " cycle through yank history with <leader>p and <leader>P after pasting, " see history with :Yanks diff --git a/.vimrc b/.vimrc @@ -64,12 +64,8 @@ endif " File from wordlist- (debian) or word- (arch) package set dictionary+=/usr/share/dict/words -" Define other file types -autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino -autocmd! BufNewFile,BufRead *.ino setlocal ft=arduino -autocmd! BufNewFile,BufRead *.cuh setlocal ft=cuda - source ~/.vim/keybinds.vim +source ~/.vim/filetypes.vim " check current folder and all parent folders for tags files set tags=tags;/ @@ -80,13 +76,3 @@ let g:mutt_aliases_file = '~/.mutt/aliases' " toggle autoformatting of text "nnoremap <leader>f :exe 'set fo'.(&fo=~'a'?'-':'+').'=a'<CR> -" enable spell checking by default for certain file types -autocmd FileType tex,md,rst,mail :setlocal spell spelllang=en_us -" -" customize what is concealed in LaTeX documents: -" a = conceal accents/ligatures -" d = conceal delimiters -" g = conceal Greek -" m = conceal math symbols -" s = conceal superscripts/subscripts -let g:tex_conceal="agm"