<commit_before>" General: packages {{{

" Note: vim-packager automatically executes UpdateRemotePlugins

function s:pack_init() abort
  packadd vim-packager
  call packager#init()
  call packager#add('<EMAIL>:kristijanhusak/vim-packager', {'type': 'opt'})

  " Autocompletion And IDE Features:
  call packager#add('<EMAIL>:neoclide/coc.nvim.git', {'do': 'yarn install --frozen-lockfile'})
  for coc_package in [
        \ '<EMAIL>:davidroeca/coc-svelte-language-tools.git',
        \ '<EMAIL>:fannheyward/coc-markdownlint.git',
        \ '<EMAIL>:fannheyward/coc-texlab.git',
        \ '<EMAIL>:iamcco/coc-diagnostic.git',
        \ '<EMAIL>:iamcco/coc-vimlsp.git',
        \ 'git<EMAIL>:josa42/coc-go.git',
        \ 'git<EMAIL>:neoclide/coc-css.git',
        \ 'git<EMAIL>:neoclide/coc-html.git',
        \ 'git<EMAIL>:neoclide/coc-java.git',
        \ 'git<EMAIL>.com:neoclide/coc-json.git',
        \ 'git<EMAIL>:neoclide/coc-lists.git',
        \ 'git<EMAIL>:neoclide/coc-pairs.git',
        \ '<EMAIL>:neoclide/coc-rls.git',
        \ '<EMAIL>:neoclide/coc-snippets.git',
        \ '<EMAIL>:neoclide/coc-tsserver.git',
        \ '<EMAIL>:neoclide/coc-yaml.git',
        \ '<EMAIL>:pappasam/coc-jedi.git',
        \ ]
    call packager#add(coc_package, {
          \ 'do': 'yarn install --frozen-lockfile && yarn build',
          \ })
  endfor

  " TreeSitter:
  call packager#add('<EMAIL>:nvim-treesitter/nvim-treesitter.git')
  call packager#add('<EMAIL>:nvim-treesitter/playground.git')

  " Vista: Tagbar replacement extraordinaire
  call packager#add('<EMAIL>:liuchengxu/vista.vim.git')

  " Colors: See CSS colors
  call packager#add('<EMAIL>:norcalli/nvim-colorizer.lua.git')

  " LocationList:
  call packager#add('<EMAIL>:elbeardmorez/vim-loclist-follow.git')

  " Tim Pope: general, uncategorizable tim pope plugins
  " Notes:
  "   * abolish: convert to snake cases
  call packager#add('<EMAIL>:tpope/vim-abolish')
  call packager#add('<EMAIL>:tpope/vim-characterize.git')
  call packager#add('git<EMAIL>:tpope/vim-commentary')
  call packager#add('git@github.com:tpope/vim-repeat')
  call packager#add('git<EMAIL>:tpope/vim-scriptease')

  " General:
  call packager#add('<EMAIL>:Shougo/defx.nvim')
  call packager#add('git@github.com:bronson/vim-visual-star-search')
  call packager#add('<EMAIL>:fidian/hexmode')
  call packager#add('<EMAIL>:junegunn/vader.vim')
  call packager#add('<EMAIL>:kh3phr3n/tabline')
  call packager#add('<EMAIL>:kristijanhusak/defx-git')
  call packager#add('<EMAIL>:kristijanhusak/defx-icons')
  call packager#add('<EMAIL>:mbbill/undotree')
  call packager#add('<EMAIL>:qpkorr/vim-bufkill')
  call packager#add('git<EMAIL>:romainl/vim-devdocs')
  call packager#add('<EMAIL>:ryvnf/readline.vim.git')
  call packager#add('<EMAIL>:simeji/winresizer')
  call packager#add('<EMAIL>:sjl/strftimedammit.vim')
  call packager#add('<EMAIL>:t9md/vim-choosewin')
  call packager#add('<EMAIL>:unblevable/quick-scope')
  call packager#add('<EMAIL>:wincent/ferret')
  call packager#add('<EMAIL>:yssl/QFEnter')
  call packager#add('<EMAIL>:alvan/vim-closetag.git')

  " KeywordPrg:
  call packager#add('<EMAIL>:pappasam/vim-keywordprg-commands.git')
  call packager#add('<EMAIL>:romainl/vim-devdocs.git')

  " Fuzzy Finder:
  call packager#add('<EMAIL>:junegunn/fzf')
  call packager#add('<EMAIL>:junegunn/fzf.vim')

  " Git:
  call packager#add('<EMAIL>:junegunn/gv.vim')
  call packager#add('<EMAIL>:rhysd/git-messenger.vim.git')
  call packager#add('<EMAIL>:tpope/vim-fugitive')
  call packager#add('<EMAIL>:sodapopcan/vim-twiggy.git')

  " Text Objects:
  call packager#add('<EMAIL>:machakann/vim-sandwich')
  call packager#add('<EMAIL>:kana/vim-textobj-user')
  " support additional delimiters
  call packager#add('<EMAIL>:EvanQuan/vim-textobj-delimiters.git')
  " al/il for the current line
  call packager#add('<EMAIL>:kana/vim-textobj-line')
  " as/is for a sentence of prose (overrides hard-coded native object & motion)
  call packager#add('git@github.com:reedes/vim-textobj-sentence')
  " az/iz for a block of folded lines; iz does not include fold marker lines
  call packager#add('<EMAIL>:somini/vim-textobj-fold')
  " ao/io for a block of indentation (i.e. spaces)
  call packager#add('<EMAIL>:glts/vim-textobj-indblock')
  " ay/iy for a syntax group
  call packager#add('<EMAIL>:kana/vim-textobj-syntax')
  " ae/ie for entire buffers
  call packager#add('git<EMAIL>:kana/vim-textobj-entire.git')
  " ai/ii for similarly indented, aI/iI for same indentation
  call packager#add('git<EMAIL>:kana/vim-textobj-indent.git')
  " au/iu for a URI, also includes URI handlers and is easy to extend
  call packager#add('git<EMAIL>:jceb/vim-textobj-uri.git')

  " Writing:
  call packager#add('git<EMAIL>:dkarter/bullets.vim')
  call packager#add('git<EMAIL>:jlesquembre/rst-tables.nvim')
  call packager#add('<EMAIL>:junegunn/goyo.vim')
  call packager#add('git<EMAIL>:junegunn/limelight.vim')
  call packager#add('git<EMAIL>:moiatgit/vim-rst-sections')

  " Previewers:
  call packager#add('<EMAIL>:iamcco/markdown-preview.nvim', {'do': 'cd app & yarn install'})
  call packager#add('<EMAIL>:tyru/open-browser.vim')
  call packager#add('<EMAIL>:weirongxu/plantuml-previewer.vim')

  " Code Formatters:
  call packager#add('<EMAIL>:pappasam/vim-filetype-formatter')

  " Repl Integration:
  " call packager#add('git<EMAIL>:jpalardy/vim-slime.git')
  call packager#add('<EMAIL>:pappasam/nvim-repl.git')

  " Indentation Only:
  call packager#add('<EMAIL>:Vimjas/vim-python-pep8-indent')
  call packager#add('<EMAIL>:Yggdroot/indentLine')
  call packager#add('<EMAIL>:vim-scripts/groovyindent-unix')

  " Syntax Theme:
  call packager#add('<EMAIL>:NLKNguyen/papercolor-theme')
  call packager#add('<EMAIL>:pappasam/papercolor-theme-slim.git')

  " Jupyter Integration:
  call packager#add('<EMAIL>:goerz/jupytext.vim.git')

  " Syntax Highlighting:
  call packager#add('git<EMAIL>.com:leafgarland/typescript-vim.git')
  call packager#add('git@github.com:Glench/Vim-Jinja2-Syntax')
  call packager#add('<EMAIL>:MaxMEllon/vim-jsx-pretty.git')
  call packager#add('<EMAIL>:NLKNguyen/c-syntax.vim')
  call packager#add('<EMAIL>:StanAngeloff/php.vim')
  call packager#add('<EMAIL>:autowitch/hive.vim')
  call packager#add('<EMAIL>:calviken/vim-gdscript3')
  call packager#add('<EMAIL>:cespare/vim-toml')
  call packager#add('<EMAIL>:chr4/nginx.vim')
  call packager#add('<EMAIL>:derekwyatt/vim-scala')
  call packager#add('<EMAIL>:ekalinin/Dockerfile.vim')
  call packager#add('<EMAIL>@github.com:evanleck/vim-svelte')
  call packager#add('git<EMAIL>:farfanoide/vim-kivy')
  call packager#add('<EMAIL>:gisraptor/vim-lilypond-integrator.git')
  call packager#add('<EMAIL>:godlygeek/tabular')
  call packager#add('<EMAIL>:groenewege/vim-less')
  call packager#add('<EMAIL>:hail2u/vim-css3-syntax.git')
  call packager#add('<EMAIL>:hashivim/vim-terraform')
  call packager#add('<EMAIL>:hashivim/vim-vagrant')
  call packager#add('<EMAIL>:jparise/vim-graphql')
  call packager#add('<EMAIL>:killphi/vim-ebnf')
  call packager#add('<EMAIL>:lervag/vimtex')
  call packager#add('<EMAIL>:marshallward/vim-restructuredtext')
  call packager#add('git<EMAIL>:martinda/Jenkinsfile-vim-syntax')
  call packager#add('git@github.com:mattn/vim-xxdcursor')
  call packager#add('<EMAIL>:mopp/rik_octave.vim')
  call packager#add('<EMAIL>:neoclide/jsonc.vim.git')
  call packager#add('git@github.<EMAIL>:neovimhaskell/haskell-vim')
  call packager#add('<EMAIL>:othree/html5.vim')
  call packager#add('<EMAIL>:pangloss/vim-javascript')
  call packager#add('<EMAIL>:aklt/plantuml-syntax.git')
  call packager#add('<EMAIL>:pearofducks/ansible-vim')
  call packager#add('<EMAIL>:plasticboy/vim-markdown')
  call packager#add('<EMAIL>:raimon49/requirements.txt.vim')
  call packager#add('<EMAIL>:ron-rs/ron.vim')
  call packager#add('<EMAIL>:rust-lang/rust.vim')
  call packager#add('<EMAIL>:tomlion/vim-solidity')
  call packager#add('<EMAIL>:vim-scripts/SAS-Syntax')
  call packager#add('<EMAIL>:vimoutliner/vimoutliner')
endfunction

command!       PackInstall call s:pack_init() | call packager#install()
command! -bang PackUpdate  call s:pack_init() | call packager#update({ 'force_hooks': '<bang>' })
command!       PackClean   call s:pack_init() | call packager#clean()
command!       PackStatus  call s:pack_init() | call packager#status()
command! -bang PU          call s:pack_init() | call packager#clean() | call packager#update({ 'force_hooks': '<bang>' })

" }}}
" General: mappings {{{

let mapleader = ','

function! s:default_key_mappings()
  " Coc: settings for coc.nvim
  nmap     <silent>        <C-]> <Plug>(coc-definition)
  nmap     <silent>        <C-LeftMouse> <Plug>(coc-definition)
  nnoremap <silent>        <C-k> <cmd>call <SID>show_documentation()<CR>
  nnoremap <silent>        <C-h> <cmd>call CocActionAsync('showSignatureHelp')<CR>
  inoremap <silent>        <C-h> <cmd>call CocActionAsync('showSignatureHelp')<CR>
  nmap     <silent>        <leader>st <Plug>(coc-type-definition)
  nmap     <silent>        <leader>si <Plug>(coc-implementation)
  nmap     <silent>        <leader>su <Plug>(coc-references)
  nmap     <silent>        <leader>sr <Plug>(coc-rename)
  nmap     <silent>        <leader>sa v<Plug>(coc-codeaction-selected)
  vmap     <silent>        <leader>sa <Plug>(coc-codeaction-selected)
  xmap     <silent>        af <Plug>(coc-funcobj-a)
  omap     <silent>        af <Plug>(coc-funcobj-a)
  xmap     <silent>        ac <Plug>(coc-classobj-a)
  omap     <silent>        ac <Plug>(coc-classobj-a)
  nnoremap <silent>        <leader>sn <cmd>CocNext<CR>
  nnoremap <silent>        <leader>sp <cmd>CocPrev<CR>
  nnoremap <silent>        <leader>sl <cmd>CocListResume<CR>
  nnoremap <silent>        <leader>sc <cmd>CocList commands<cr>
  nnoremap <silent>        <leader>so <cmd>CocList -A outline<cr>
  nnoremap <silent>        <leader>sw <cmd>CocList -A -I symbols<cr>
  inoremap <silent> <expr> <c-space> coc#refresh()
  nnoremap <silent> <expr> <C-e> coc#util#has_float() ? coc#util#float_scroll(1) : "\<C-e>"
  nnoremap <silent> <expr> <C-y> coc#util#has_float() ? coc#util#float_scroll(0) : "\<C-y>"
  imap     <silent> <expr> <C-l> coc#expandable() ? "<Plug>(coc-snippets-expand)" : "\<C-y>"
  inoremap <silent> <expr> <CR> pumvisible() ? '<CR>' : '<C-g>u<CR><c-r>=coc#on_enter()<CR>'
  nnoremap                 <leader>d <cmd>call CocActionAsync('diagnosticToggle')<CR>
  nmap     <silent>        <leader>n <Plug>(coc-diagnostic-next)
  nmap     <silent>        <leader>p <Plug>(coc-diagnostic-prev)

  " Escape: also clears highlighting
  nnoremap <silent> <esc> :noh<return><esc>

  " J: unmap in normal mode unless range explicitly specified
  nnoremap <silent> <expr> J v:count == 0 ? '<esc>' : 'J'

  " SearchBackward: remap comma to single quote
  nnoremap ' ,

  " Exit: Preview, Help, QuickFix, and Location List
  inoremap <silent> <C-c> <Esc>:pclose <BAR> cclose <BAR> lclose <CR>a
  nnoremap <silent> <C-c> :pclose <BAR> cclose <BAR> lclose <CR>

  " InsertModeHelpers: Insert one line above after enter
  inoremap <M-CR> <CR><C-o>O

  " MoveVisual: up and down visually only if count is specified before
  nnoremap <expr> k v:count == 0 ? 'gk' : 'k'
  vnoremap <expr> k v:count == 0 ? 'gk' : 'k'<commit_msg>Fix coc floating jump, documente <C-w><C-p><commit_after>" General: packages {{{

" Note: vim-packager automatically executes UpdateRemotePlugins

function s:pack_init() abort
  packadd vim-packager
  call packager#init()
  call packager#add('git@github.com:kristijanhusak/vim-packager', {'type': 'opt'})

  " Autocompletion And IDE Features:
  call packager#add('git<EMAIL>:neoclide/coc.nvim.git', {'do': 'yarn install --frozen-lockfile'})
  for coc_package in [
        \ 'git<EMAIL>:davidroeca/coc-svelte-language-tools.git',
        \ '<EMAIL>:fannheyward/coc-markdownlint.git',
        \ '<EMAIL>:fannheyward/coc-texlab.git',
        \ 'git<EMAIL>:iamcco/coc-diagnostic.git',
        \ 'git<EMAIL>:iamcco/coc-vimlsp.git',
        \ '<EMAIL>:josa42/coc-go.git',
        \ 'git<EMAIL>:neoclide/coc-css.git',
        \ 'git<EMAIL>:neoclide/coc-html.git',
        \ '<EMAIL>:neoclide/coc-java.git',
        \ '<EMAIL>:neoclide/coc-json.git',
        \ '<EMAIL>:neoclide/coc-lists.git',
        \ '<EMAIL>:neoclide/coc-pairs.git',
        \ '<EMAIL>:neoclide/coc-rls.git',
        \ '<EMAIL>:neoclide/coc-snippets.git',
        \ '<EMAIL>:neoclide/coc-tsserver.git',
        \ '<EMAIL>:neoclide/coc-yaml.git',
        \ '<EMAIL>:pappasam/coc-jedi.git',
        \ ]
    call packager#add(coc_package, {
          \ 'do': 'yarn install --frozen-lockfile && yarn build',
          \ })
  endfor

  " TreeSitter:
  call packager#add('<EMAIL>:nvim-treesitter/nvim-treesitter.git')
  call packager#add('<EMAIL>:nvim-treesitter/playground.git')

  " Vista: Tagbar replacement extraordinaire
  call packager#add('<EMAIL>:liuchengxu/vista.vim.git')

  " Colors: See CSS colors
  call packager#add('<EMAIL>:norcalli/nvim-colorizer.lua.git')

  " LocationList:
  call packager#add('<EMAIL>:elbeardmorez/vim-loclist-follow.git')

  " Tim Pope: general, uncategorizable tim pope plugins
  " Notes:
  "   * abolish: convert to snake cases
  call packager#add('<EMAIL>:tpope/vim-abolish')
  call packager#add('<EMAIL>:tpope/vim-characterize.git')
  call packager#add('<EMAIL>:tpope/vim-commentary')
  call packager#add('<EMAIL>:tpope/vim-repeat')
  call packager#add('<EMAIL>@github.com:tpope/vim-scriptease')

  " General:
  call packager#add('git@github.<EMAIL>:Shougo/defx.nvim')
  call packager#add('git@github.com:bronson/vim-visual-star-search')
  call packager#add('git<EMAIL>:fidian/hexmode')
  call packager#add('<EMAIL>:junegunn/vader.vim')
  call packager#add('<EMAIL>:kh3phr3n/tabline')
  call packager#add('<EMAIL>:kristijanhusak/defx-git')
  call packager#add('<EMAIL>:kristijanhusak/defx-icons')
  call packager#add('git<EMAIL>:mbbill/undotree')
  call packager#add('git<EMAIL>:qpkorr/vim-bufkill')
  call packager#add('git@github.com:romainl/vim-devdocs')
  call packager#add('git<EMAIL>.com:ryvnf/readline.vim.git')
  call packager#add('git@github.com:simeji/winresizer')
  call packager#add('git@github.com:sjl/strftimedammit.vim')
  call packager#add('git@github.com:t9md/vim-choosewin')
  call packager#add('git@github.com:unblevable/quick-scope')
  call packager#add('git<EMAIL>:wincent/ferret')
  call packager#add('<EMAIL>:yssl/QFEnter')
  call packager#add('<EMAIL>:alvan/vim-closetag.git')

  " KeywordPrg:
  call packager#add('<EMAIL>:pappasam/vim-keywordprg-commands.git')
  call packager#add('<EMAIL>:romainl/vim-devdocs.git')

  " Fuzzy Finder:
  call packager#add('git<EMAIL>:junegunn/fzf')
  call packager#add('<EMAIL>.com:junegunn/fzf.vim')

  " Git:
  call packager#add('<EMAIL>:junegunn/gv.vim')
  call packager#add('<EMAIL>:rhysd/git-messenger.vim.git')
  call packager#add('<EMAIL>:tpope/vim-fugitive')
  call packager#add('<EMAIL>:sodapopcan/vim-twiggy.git')

  " Text Objects:
  call packager#add('<EMAIL>:machakann/vim-sandwich')
  call packager#add('<EMAIL>:kana/vim-textobj-user')
  " support additional delimiters
  call packager#add('<EMAIL>:EvanQuan/vim-textobj-delimiters.git')
  " al/il for the current line
  call packager#add('git@github.<EMAIL>:kana/vim-textobj-line')
  " as/is for a sentence of prose (overrides hard-coded native object & motion)
  call packager#add('git@github.<EMAIL>:reedes/vim-textobj-sentence')
  " az/iz for a block of folded lines; iz does not include fold marker lines
  call packager#add('git@github.com:somini/vim-textobj-fold')
  " ao/io for a block of indentation (i.e. spaces)
  call packager#add('git@github.com:glts/vim-textobj-indblock')
  " ay/iy for a syntax group
  call packager#add('<EMAIL>:kana/vim-textobj-syntax')
  " ae/ie for entire buffers
  call packager#add('<EMAIL>:kana/vim-textobj-entire.git')
  " ai/ii for similarly indented, aI/iI for same indentation
  call packager#add('<EMAIL>:kana/vim-textobj-indent.git')
  " au/iu for a URI, also includes URI handlers and is easy to extend
  call packager#add('<EMAIL>:jceb/vim-textobj-uri.git')

  " Writing:
  call packager#add('<EMAIL>:dkarter/bullets.vim')
  call packager#add('<EMAIL>:jlesquembre/rst-tables.nvim')
  call packager#add('<EMAIL>:junegunn/goyo.vim')
  call packager#add('<EMAIL>:junegunn/limelight.vim')
  call packager#add('<EMAIL>:moiatgit/vim-rst-sections')

  " Previewers:
  call packager#add('<EMAIL>:iamcco/markdown-preview.nvim', {'do': 'cd app & yarn install'})
  call packager#add('<EMAIL>:tyru/open-browser.vim')
  call packager#add('<EMAIL>:weirongxu/plantuml-previewer.vim')

  " Code Formatters:
  call packager#add('<EMAIL>:pappasam/vim-filetype-formatter')

  " Repl Integration:
  " call packager#add('<EMAIL>:jpalardy/vim-slime.git')
  call packager#add('<EMAIL>:pappasam/nvim-repl.git')

  " Indentation Only:
  call packager#add('git@github.com:Vimjas/vim-python-pep8-indent')
  call packager#add('git@github.com:Yggdroot/indentLine')
  call packager#add('<EMAIL>:vim-scripts/groovyindent-unix')

  " Syntax Theme:
  call packager#add('<EMAIL>:NLKNguyen/papercolor-theme')
  call packager#add('<EMAIL>:pappasam/papercolor-theme-slim.git')

  " Jupyter Integration:
  call packager#add('<EMAIL>:goerz/jupytext.vim.git')

  " Syntax Highlighting:
  call packager#add('<EMAIL>:leafgarland/typescript-vim.git')
  call packager#add('<EMAIL>@github.com:Glench/Vim-Jinja2-Syntax')
  call packager#add('git<EMAIL>:MaxMEllon/vim-jsx-pretty.git')
  call packager#add('git<EMAIL>:NLKNguyen/c-syntax.vim')
  call packager#add('<EMAIL>:StanAngeloff/php.vim')
  call packager#add('<EMAIL>:autowitch/hive.vim')
  call packager#add('<EMAIL>:calviken/vim-gdscript3')
  call packager#add('<EMAIL>:cespare/vim-toml')
  call packager#add('<EMAIL>:chr4/nginx.vim')
  call packager#add('<EMAIL>:derekwyatt/vim-scala')
  call packager#add('<EMAIL>:ekalinin/Dockerfile.vim')
  call packager#add('<EMAIL>:evanleck/vim-svelte')
  call packager#add('git<EMAIL>:farfanoide/vim-kivy')
  call packager#add('<EMAIL>:gisraptor/vim-lilypond-integrator.git')
  call packager#add('git@github.com:godlygeek/tabular')
  call packager#add('<EMAIL>:groenewege/vim-less')
  call packager#add('<EMAIL>:hail2u/vim-css3-syntax.git')
  call packager#add('<EMAIL>:hashivim/vim-terraform')
  call packager#add('<EMAIL>:hashivim/vim-vagrant')
  call packager#add('<EMAIL>:jparise/vim-graphql')
  call packager#add('<EMAIL>:killphi/vim-ebnf')
  call packager#add('<EMAIL>:lervag/vimtex')
  call packager#add('<EMAIL>:marshallward/vim-restructuredtext')
  call packager#add('<EMAIL>:martinda/Jenkinsfile-vim-syntax')
  call packager#add('<EMAIL>:mattn/vim-xxdcursor')
  call packager#add('<EMAIL>:mopp/rik_octave.vim')
  call packager#add('git<EMAIL>:neoclide/jsonc.vim.git')
  call packager#add('<EMAIL>:neovimhaskell/haskell-vim')
  call packager#add('<EMAIL>:othree/html5.vim')
  call packager#add('<EMAIL>:pangloss/vim-javascript')
  call packager#add('<EMAIL>:aklt/plantuml-syntax.git')
  call packager#add('<EMAIL>:pearofducks/ansible-vim')
  call packager#add('<EMAIL>:plasticboy/vim-markdown')
  call packager#add('<EMAIL>:raimon49/requirements.txt.vim')
  call packager#add('<EMAIL>:ron-rs/ron.vim')
  call packager#add('<EMAIL>:rust-lang/rust.vim')
  call packager#add('<EMAIL>:tomlion/vim-solidity')
  call packager#add('git<EMAIL>:vim-scripts/SAS-Syntax')
  call packager#add('<EMAIL>:vimoutliner/vimoutliner')
endfunction

command!       PackInstall call s:pack_init() | call packager#install()
command! -bang PackUpdate  call s:pack_init() | call packager#update({ 'force_hooks': '<bang>' })
command!       PackClean   call s:pack_init() | call packager#clean()
command!       PackStatus  call s:pack_init() | call packager#status()
command! -bang PU          call s:pack_init() | call packager#clean() | call packager#update({ 'force_hooks': '<bang>' })

" }}}
" General: mappings {{{

let mapleader = ','

function! s:default_key_mappings()
  " Coc: settings for coc.nvim
  " NOTE: <C-w><C-p> gets you in, and out, of floating windows
  nmap     <silent>        <C-]> <Plug>(coc-definition)
  nmap     <silent>        <C-LeftMouse> <Plug>(coc-definition)
  nnoremap <silent>        <C-k> <cmd>call <SID>show_documentation()<CR>
  nnoremap <silent>        <C-h> <cmd>call CocActionAsync('showSignatureHelp')<CR>
  inoremap <silent>        <C-h> <cmd>call CocActionAsync('showSignatureHelp')<CR>
  nmap     <silent>        <leader>st <Plug>(coc-type-definition)
  nmap     <silent>        <leader>si <Plug>(coc-implementation)
  nmap     <silent>        <leader>su <Plug>(coc-references)
  nmap     <silent>        <leader>sr <Plug>(coc-rename)
  nmap     <silent>        <leader>sa v<Plug>(coc-codeaction-selected)
  vmap     <silent>        <leader>sa <Plug>(coc-codeaction-selected)
  xmap     <silent>        af <Plug>(coc-funcobj-a)
  omap     <silent>        af <Plug>(coc-funcobj-a)
  xmap     <silent>        ac <Plug>(coc-classobj-a)
  omap     <silent>        ac <Plug>(coc-classobj-a)
  nnoremap <silent>        <leader>sn <cmd>CocNext<CR>
  nnoremap <silent>        <leader>sp <cmd>CocPrev<CR>
  nnoremap <silent>        <leader>sl <cmd>CocListResume<CR>
  nnoremap <silent>        <leader>sc <cmd>CocList commands<cr>
  nnoremap <silent>        <leader>so <cmd>CocList -A outline<cr>
  nnoremap <silent>        <leader>sw <cmd>CocList -A -I symbols<cr>
  inoremap <silent> <expr> <c-space> coc#refresh()
  nnoremap <silent> <expr> <C-e> coc#float#has_float() ? coc#float#scroll(1) : "\<C-e>"
  nnoremap <silent> <expr> <C-y> coc#float#has_float() ? coc#float#scroll(0) : "\<C-y>"
  imap     <silent> <expr> <C-l> coc#expandable() ? "<Plug>(coc-snippets-expand)" : "\<C-y>"
  inoremap <silent> <expr> <CR> pumvisible() ? '<CR>' : '<C-g>u<CR><c-r>=coc#on_enter()<CR>'
  nnoremap                 <leader>d <cmd>call CocActionAsync('diagnosticToggle')<CR>
  nmap     <silent>        <leader>n <Plug>(coc-diagnostic-next)
  nmap     <silent>        <leader>p <Plug>(coc-diagnostic-prev)

  " Escape: also clears highlighting
  nnoremap <silent> <esc> :noh<return><esc>

  " J: unmap in normal mode unless range explicitly specified
  nnoremap <silent> <expr> J v:count == 0 ? '<esc>' : 'J'

  " SearchBackward: remap comma to single quote
  nnoremap ' ,

  " Exit: Preview, Help, QuickFix, and Location List
  inoremap <silent> <C-c> <Esc>:pclose <BAR> cclose <BAR> lclose <CR>a
  nnoremap <silent> <C-c> :pclose <BAR> cclose <BAR> lclose <CR>

  " InsertModeHelpers: Insert one line above after enter
  inoremap <M-CR> <CR><C-o>O

  " MoveVisual: up and down visually only if count is specified before
  nnoremap <expr> k v:count == 0 ? 'gk' : 'k'
  vnoremap <expr> k v:count == 0 ? 'gk' : 'k'
{'fraction_non_alphanumeric': 0.17235307065815542, 'fraction_numerical': 0.001672903367818622, 'mean_word_length': 4.590942653211912, 'pattern_counts': {'":': 0, '<': 488, '<?xml version=': 0, '>': 488, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 17, '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': '219616', 'n_tokens_mistral': 9180, 'n_tokens_neox': 8628, 'n_words': 1340}