From 2b5bb1a6e2d7e4f94198b1a8072809daf7a3dca2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Mon, 14 Oct 2024 13:52:09 +0200 Subject: [PATCH] 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. --- vim/.vimrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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') -- 2.30.2