From: Lukáš Jiřiště Date: Mon, 14 Oct 2024 11:52:09 +0000 (+0200) Subject: Add textwidth, spellcheck and latex plugin X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=2b5bb1a6e2d7e4f94198b1a8072809daf7a3dca2;p=dotfiles.git Add textwidth, spellcheck and latex plugin The standard text width is 80 chars now. The spellcheck is turned on for git commits and got tex documents. The latex plugin is called LaTeX-suite. I probably should have split this into multiple commits but I did it all at once and it is only a couple of lines. --- diff --git a/vim/.vimrc b/vim/.vimrc index e79d3f5..5c27fd0 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -5,9 +5,14 @@ call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged') " 42 Header on F1 Plug 'https://github.com/42Paris/42header' +Plug 'vim-latex/vim-latex' + " List ends here. Plugins become visible to Vim after this call. call plug#end() +" May be useful for vim-latex? +let g:tex_flavor='latex' + " Defining name and email for the 42 header let g:user42 = 'ljiriste' let g:mail42 = 'ljiriste@student.42prague.com' @@ -15,11 +20,10 @@ let g:mail42 = 'ljiriste@student.42prague.com' set nocompatible set tabstop=4 set shiftwidth=0 +set textwidth=80 set number relativenumber set incsearch set autoindent -syntax on -filetype plugin indent on " redundant after syntax on set splitright " Add every subfolder of the vim root folder to path for find command @@ -28,6 +32,12 @@ set path+=** " Add visual menu set wildmenu +syntax on +filetype plugin indent on " redundant after syntax on + +autocmd FileType gitcommit set spell spelllang=en_us +autocmd FileType tex set spell spelllang=en_us + function Cpp_class(classname) let skel = join(readfile(glob('~/.vim/templates/class_skeleton.h')), "\n") let skel = substitute(skel, 'Classname', a:classname, 'g')