<commit_before>" via: http://rails-bestpractices.com/posts/60-remove-trailing-whitespace
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
    " Preparation: save last search, and cursor position.
    let _s=@/
    let l = line(".")
    let c = col(".")
    " Do the business:
    %s/\s\+$//e
    " Clean up: restore previous search history, and cursor position
    let @/=_s
    call cursor(l, c)
endfunction
command! StripTrailingWhitespaces call <SID>StripTrailingWhitespaces()
nmap ,w :StripTrailingWhitespaces<CR>
autocmd FileType c,cpp,java,php,ruby,python,elixir autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
<commit_msg>Change strip trailing whitespace shortcut<commit_after>" via: http://rails-bestpractices.com/posts/60-remove-trailing-whitespace
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
    " Preparation: save last search, and cursor position.
    let _s=@/
    let l = line(".")
    let c = col(".")
    " Do the business:
    %s/\s\+$//e
    " Clean up: restore previous search history, and cursor position
    let @/=_s
    call cursor(l, c)
endfunction
command! StripTrailingWhitespaces call <SID>StripTrailingWhitespaces()
nmap <leader>kw :StripTrailingWhitespaces<CR>
autocmd FileType c,cpp,java,php,ruby,python,elixir autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()

{'fraction_non_alphanumeric': 0.11863173216885008, 'fraction_numerical': 0.002911208151382824, 'mean_word_length': 4.7053941908713695, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '3615668', 'n_tokens_mistral': 466, 'n_tokens_neox': 449, 'n_words': 118}