<commit_before>" encoding
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

" share system clipboard
if has("win16") || has("win32") || has("win64")
    set clipboard=unnamedplus
else
    set clipboard=unnamed
endif

" copy to attached terminal using the yank(1) script:
" https://github.com/sunaku/home/blob/master/bin/yank
noremap <silent> <leader>y y:call system('yank', @0)<Return>

set mouse=nv "Enable mouse use in all modes
set ttyfast "Send more characters for redraws
if has('nvim')
else
  set ttymouse=xterm2
endif

" complete
set completeopt=menu,menuone,preview
"set completeopt=menuone,menu,longest,preview

set pastetoggle=<F7>
set tags=.tags;
map <F10> :!ctags -R --fields=+iaS --extra=+q -f .tags .<CR>

let g:used_javascript_libs = 'jquery'

au BufNewFile,BufRead *.mxml set filetype=mxml
au BufNewFile,BufRead *.jsp set filetype=java
au BufNewFile,BufRead *.es6 set filetype=javascript
au BufNewFile,BufRead *.as set filetype=actionscript
au BufNewFile,BufRead {Gemfile,Rakefile,Capfile,*.rake,config.ru} set ft=ruby
au BufNewFile,BufRead *.gradle set filetype=groovy

au FileType text setlocal textwidth=80
" return previous editing position
au BufReadPost *
            \ if line("'\"") > 1 && line("'\"") <= line("$") |
            \   exe "normal! g`\"" |
            \ endif
au FileType python let python_highlight_all=1
au FileType python setlocal omnifunc=pythoncomplete#Complete

" support jsonc - json with comment
autocmd FileType json syntax match Comment +\/\/.\+$+

"use coc.vim eslint
au FileType javascript,typescript :ALEDisable
au FileType javascript,typescript setlocal ts=2 sts=2 sw=2

au FileType ruby,eruby setlocal ts=2 sts=2 sw=2
au FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
au FileType ruby,eruby setlocal omnifunc=rubycomplete#Complete

au FileType c,cpp setlocal  ts=2 sts=2 sw=2
au FileType c,cpp nnoremap <F6> :YcmForceCompileAndDiagnostics<CR>
au FileType cpp map <F10> :!ctags -R --c++-kinds=+pl --fields=+ialS --extra=+q .<CR><commit_msg>fix: enable ALE for javascript<commit_after>" encoding
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

" share system clipboard
if has("win16") || has("win32") || has("win64")
    set clipboard=unnamedplus
else
    set clipboard=unnamed
endif

" copy to attached terminal using the yank(1) script:
" https://github.com/sunaku/home/blob/master/bin/yank
noremap <silent> <leader>y y:call system('yank', @0)<Return>

set mouse=nv "Enable mouse use in all modes
set ttyfast "Send more characters for redraws
if has('nvim')
else
  set ttymouse=xterm2
endif

" complete
set completeopt=menu,menuone,preview
"set completeopt=menuone,menu,longest,preview

set pastetoggle=<F7>
set tags=.tags;
map <F10> :!ctags -R --fields=+iaS --extra=+q -f .tags .<CR>

let g:used_javascript_libs = 'jquery'

au BufNewFile,BufRead *.mxml set filetype=mxml
au BufNewFile,BufRead *.jsp set filetype=java
au BufNewFile,BufRead *.es6 set filetype=javascript
au BufNewFile,BufRead *.as set filetype=actionscript
au BufNewFile,BufRead {Gemfile,Rakefile,Capfile,*.rake,config.ru} set ft=ruby
au BufNewFile,BufRead *.gradle set filetype=groovy

au FileType text setlocal textwidth=80
" return previous editing position
au BufReadPost *
            \ if line("'\"") > 1 && line("'\"") <= line("$") |
            \   exe "normal! g`\"" |
            \ endif
au FileType python let python_highlight_all=1
au FileType python setlocal omnifunc=pythoncomplete#Complete

" support jsonc - json with comment
autocmd FileType json syntax match Comment +\/\/.\+$+

"use coc.vim eslint
au FileType typescript :ALEDisable
au FileType javascript,typescript setlocal ts=2 sts=2 sw=2

au FileType ruby,eruby setlocal ts=2 sts=2 sw=2
au FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
au FileType ruby,eruby setlocal omnifunc=rubycomplete#Complete

au FileType c,cpp setlocal  ts=2 sts=2 sw=2
au FileType c,cpp nnoremap <F6> :YcmForceCompileAndDiagnostics<CR>
au FileType cpp map <F10> :!ctags -R --c++-kinds=+pl --fields=+ialS --extra=+q .<CR>
{'fraction_non_alphanumeric': 0.11926605504587157, 'fraction_numerical': 0.020762916465475616, 'mean_word_length': 5.048175182481752, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2620742', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1467, 'n_words': 413}