<commit_before>" ###########################
" VARIOUS: personal settings
" ###########################

" Set comma as leader
let mapleader = ","

" Display number of current line
set number

" Enable syntax highlighting
syntax on

" Force markdown recognition
autocmd BufNewFile,BufReadPost *.md set filetype=markdown

" Hit Control+g to "getaway" from parenthesis
inoremap <C-g> <Esc>/[)}*"»'`\]*]<CR>:nohl<CR>a

" Disable mouse visual mode
set mouse-=a

" Have sane text files
set fileformat=unix

" The idea here is to allow wrapping, mainly for text editing.
set wrap
set linebreak

" Disable list (otherwise, breaks linebreak)
set nolist 

set textwidth=0
set wrapmargin=0
set formatoptions=qrn1
set breakindent showbreak=..

" But when coding, we will want to see the 80 character limit as a reminder
" of good practices.
set colorcolumn=80

" Show cursor at all times
set ruler

" Display extra whitespace
set list listchars=tab:»·,trail:·,nbsp:·

set foldmethod=indent

" Open all folds on document load
set foldlevelstart=9

set shiftwidth=2 tabstop=2 softtabstop=2 expandtab

" Indent sanely
set autoindent
set smartindent

" Never use arrow keys ;-)
nnoremap <Left> :echoe "Use c"<CR>
nnoremap <Right> :echoe "Use r"<CR>
nnoremap <Up> :echoe "Use s"<CR>
nnoremap <Down> :echoe "Use t"<CR>

" Get rid of additionnal files
set nobackup
set nowritebackup
set noswapfile

" Prefer a slightly higher line height
set linespace=3

" Hide mouse when typing
set mousehide

" French Spelling
setlocal spell spelllang=fr

" Abbreviations

function LatexAbbreviations()
  iab git \spacedlowsmallcaps{git}
  iab Git \spacedlowsmallcaps{git}
endfunction

augroup MyAbbreviations
  autocmd!
  autocmd BufNewFile,BufRead *.tex call LatexAbbreviations()
augroup
<commit_msg>Improve LaTeX support in vim<commit_after>" ###########################
" VARIOUS: personal settings
" ###########################

" Set comma as leader
let mapleader = ","

" Display number of current line
set number

" Enable syntax highlighting
syntax on

" Force markdown recognition
autocmd BufNewFile,BufReadPost *.md set filetype=markdown

" Hit Control+g to "getaway" from parenthesis
inoremap <C-g> <Esc>/[)}*"»'`\]*]<CR>:nohl<CR>a

" Disable mouse visual mode
set mouse-=a

" Have sane text files
set fileformat=unix

" The idea here is to allow wrapping, mainly for text editing.
set wrap
set linebreak

" Disable list (otherwise, breaks linebreak)
set nolist 

set textwidth=0
set wrapmargin=0
set formatoptions=qrn1
set breakindent showbreak=..

" But when coding, we will want to see the 80 character limit as a reminder
" of good practices.
set colorcolumn=80

" Show cursor at all times
set ruler

" Display extra whitespace
set list listchars=tab:»·,trail:·,nbsp:·

set foldmethod=indent

" Open all folds on document load
set foldlevelstart=9

set shiftwidth=2 tabstop=2 softtabstop=2 expandtab

" Indent sanely
set autoindent
set smartindent

" Never use arrow keys ;-)
nnoremap <Left> :echoe "Use c"<CR>
nnoremap <Right> :echoe "Use r"<CR>
nnoremap <Up> :echoe "Use s"<CR>
nnoremap <Down> :echoe "Use t"<CR>

" Get rid of additionnal files
set nobackup
set nowritebackup
set noswapfile

" Prefer a slightly higher line height
set linespace=3

" Hide mouse when typing
set mousehide

" French Spelling
setlocal spell spelllang=fr

" Add quick delimiters for tex (since delimitmate and vim-latex are
" conflicting)
autocmd FileType tex inoremap <buffer> ( ()<C-G>U<Left>
autocmd FileType tex inoremap <buffer> [ []<C-G>U<Left>
autocmd FileType tex inoremap <buffer> { {}<C-G>U<Left>
autocmd FileType tex inoremap <buffer> " ""<C-G>U<Left>
autocmd FileType tex inoremap <buffer> « «~~»<C-G>U<Left><Left>

" Add TeX Abbreviations
function LatexAbbreviations()
  iab git \gls{git}
  iab Git \gls{git}
  iab Linux \gls{linux}
endfunction

augroup MyAbbreviations
  autocmd!
  autocmd FileType tex call LatexAbbreviations()
augroup END

{'fraction_non_alphanumeric': 0.11454081632653061, 'fraction_numerical': 0.006122448979591836, 'mean_word_length': 5.1748031496063, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3997592', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1291, 'n_words': 480}