<commit_before>set pastetoggle=<F2>
set wildcharm=<C-Z>

" shortcut to edit this file
nnoremap <leader>es :vs <C-R>=MYVIMSHORTCUTS<CR><CR>
nnoremap <leader>. :source $MYVIMRC<CR>

" during a conflict resolution, the user can navigate with this pattern
" in the different parts of conflicts in the file
nnoremap <leader>n /^\(<<<<\\|====\\|>>>>\)<CR>
noremap <leader>u :UndotreeToggle<CR>
nnoremap <leader>r :set relativenumber!<CR>
nnoremap <F3> :set hlsearch!<CR>
nnoremap <leader>s :bnext<CR>
nnoremap <leader>a :bprevious<CR>
nnoremap <leader>m :make<CR>

" Non quitting analog of ZZ
nmap zz :w<CR>

nnoremap <leader>j :m .+1<CR>==
nnoremap <leader>k :m .-2<CR>==
vnoremap <leader>j :m '>+1<CR>gv=gv
vnoremap <leader>k :m '<-2<CR>gv=gv
noremap <Up>     <NOP>
noremap <Down>   <NOP>
noremap <Left>   <NOP>
noremap <Right>  <NOP>

nnoremap <leader>" ciW""<esc>P
nnoremap <leader>' ciW''<esc>P
vnoremap <leader>" c""<esc>P
vnoremap <leader>' c''<esc>P

" ctrl u -> set the word under the cursor in uppercase
inoremap <c-u> <esc>viwUgi

" shortcut to comment a line, per filetype
autocmd FileType c,cpp,php,javascript nnoremap <buffer> <localleader>c I// <esc>:silent! s~^\(\s*\)// // ~\1~<cr>
autocmd FileType python     nnoremap <buffer> <localleader>c I# <esc>:s~^\(\s*\)# # ~\1~<cr>

" shortcut to comment a block, per filetype
autocmd FileType c,cpp,php,javascript vnoremap <buffer> <localleader>c <esc>'<O/*<esc>'>o*/<esc>
autocmd FileType python     vnoremap <buffer> <localleader>c <esc>'<O"""<esc>'>o"""<esc><commit_msg>surround shortcut added with brackets and parenthesis<commit_after>set pastetoggle=<F2>
set wildcharm=<C-Z>

" shortcut to edit this file
nnoremap <leader>es :vs <C-R>=MYVIMSHORTCUTS<CR><CR>
nnoremap <leader>. :source $MYVIMRC<CR>

" during a conflict resolution, the user can navigate with this pattern
" in the different parts of conflicts in the file
nnoremap <leader>n /^\(<<<<\\|====\\|>>>>\)<CR>
noremap <leader>u :UndotreeToggle<CR>
nnoremap <leader>r :set relativenumber!<CR>
nnoremap <F3> :set hlsearch!<CR>
nnoremap <leader>s :bnext<CR>
nnoremap <leader>a :bprevious<CR>
nnoremap <leader>m :make<CR>

" Non quitting analog of ZZ
nmap zz :w<CR>

nnoremap <leader>j :m .+1<CR>==
nnoremap <leader>k :m .-2<CR>==
vnoremap <leader>j :m '>+1<CR>gv=gv
vnoremap <leader>k :m '<-2<CR>gv=gv
noremap <Up>     <NOP>
noremap <Down>   <NOP>
noremap <Left>   <NOP>
noremap <Right>  <NOP>

nnoremap <leader>" ciW""<esc>P
nnoremap <leader>' ciW''<esc>P
nnoremap <leader>[ ciW[]<esc>P
nnoremap <leader>( ciW()<esc>P
nnoremap <leader>{ ciW{}<esc>P
vnoremap <leader>" c""<esc>P
vnoremap <leader>' c''<esc>P
vnoremap <leader>[ c[]<esc>P
vnoremap <leader>( c()<esc>P
vnoremap <leader>{ c{}<esc>P

" ctrl u -> set the word under the cursor in uppercase
inoremap <c-u> <esc>viwUgi

" shortcut to comment a line, per filetype
autocmd FileType c,cpp,php,javascript nnoremap <buffer> <localleader>c I// <esc>:silent! s~^\(\s*\)// // ~\1~<cr>
autocmd FileType python     nnoremap <buffer> <localleader>c I# <esc>:s~^\(\s*\)# # ~\1~<cr>

" shortcut to comment a block, per filetype
autocmd FileType c,cpp,php,javascript vnoremap <buffer> <localleader>c <esc>'<O/*<esc>'>o*/<esc>
autocmd FileType python     vnoremap <buffer> <localleader>c <esc>'<O"""<esc>'>o"""<esc>
{'fraction_non_alphanumeric': 0.184981684981685, 'fraction_numerical': 0.004884004884004884, 'mean_word_length': 5.647058823529412, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 165, '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': '186301', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1356, 'n_words': 359}