<commit_before>scriptencoding utf-8

"
" Profiling
"

let s:start_time = reltime()
augroup startup
  autocmd!
  autocmd VimEnter * if !empty(nvim_list_uis()) | echo reltimestr(reltime(s:start_time)) | endif
augroup end

"
" Preferences
"

" Backend
set undofile " Persist undo history.
set hidden " Allow backgrounding dirty buffers.

" Colors
set termguicolors " Use 24-bit color.
let g:colors_name = util#has_colorscheme('nord') ? 'nord' : 'default' " Use nord if available.

" Cursor/Movement
set scrolloff=2 " Keep the cursor two lines from the top/bottom.
set virtualedit=onemore,block " Allow cursor to the end of the line (and anywhere in visual-block.)
let g:tmux_navigator_disable_when_zoomed = 1 " Disable Tmux integration when zoomed.

" Grep
set grepprg=rg\ -i\ --vimgrep " Use ripgrep.
set grepformat^=%f:%l:%c:%m

" Mouse
set mouse=a " Enable full mouse support.

" Numbering
set number relativenumber " Show (relative) line numbers.
augroup numbertoggle " Toggle 'relativenumber' on insert.
  autocmd!
  autocmd InsertEnter,BufLeave,WinLeave,FocusLost * nested
            \ if &l:number && empty(&buftype) |
            \ setlocal norelativenumber |
            \ endif
  autocmd InsertLeave,BufEnter,WinEnter,FocusGained * nested
              \ if &l:number && mode() != 'i' && empty(&buftype) |
              \ setlocal relativenumber |
              \ endif
augroup END

" Remote Plugins
let g:loaded_python_provider = 0 " Disable Python 2.
let g:python3_host_prog = $PYENV_ROOT . '/versions/neovim/bin/python' " Locate Python 3 venv.

" Search
set ignorecase smartcase " Ignore case when searching, unless a uppercase letter is present.
noremap <expr> <plug>(slash-after) 'zz'.slash#blink(2, 50)| " Center/blink after search.

" Status
set noshowmode showtabline=2 " Hide mode, always show tabline.

" Splits
set splitright splitbelow " Open vertical splits to the right, horizontal below.
let g:obvious_resize_run_tmux = 1 " Enable Tmux resizing integration.

" Sneak
let g:sneak#s_next = 1 " Enable 'clever s' jumping.
let g:sneak#f_reset = 1 " Set ; and , when f is used...
let g:sneak#t_reset = 1 " ...same for t.
let g:sneak#absolute_dir = 1 " Make ; and , move in a consistent direction.

" Substitution
set inccommand=split " Show incomplete substitutions in a preview split.

" Syntax
let g:go_highlight_build_constraints = 1
let g:python_highlight_all = 1

" Terminal
let $GIT_EDITOR = 'nvr --remote-wait -cc split' " Open commits in a split.

" Whitespace
set list listchars=tab:→·,nbsp:·,trail:~,extends:»,precedes:« " Show hidden characters.
set showbreak=>\  " Show a character for wrapped lines.
let g:indentLine_char = '┊' " Use a small line to show space-based indentation.

" Wrapping
set colorcolumn=+1 " Show the wrapping column visually.
set linebreak breakindent " Enable visual line wrapping.

" Other
let g:carbon_now_sh_options = {
      \ 't': g:colors_name,
      \ 'fm': 'Source Code Pro',
      \ }
let g:loaded_matchit = 1 " Disable matchit.
let g:loaded_matchparen = 1 " Disable matchparen.<commit_msg>neovim: use git-editor for $GIT_EDITOR<commit_after>scriptencoding utf-8

"
" Profiling
"

let s:start_time = reltime()
augroup startup
  autocmd!
  autocmd VimEnter * if !empty(nvim_list_uis()) | echo reltimestr(reltime(s:start_time)) | endif
augroup end

"
" Preferences
"

" Backend
set undofile " Persist undo history.
set hidden " Allow backgrounding dirty buffers.

" Colors
set termguicolors " Use 24-bit color.
let g:colors_name = util#has_colorscheme('nord') ? 'nord' : 'default' " Use nord if available.

" Cursor/Movement
set scrolloff=2 " Keep the cursor two lines from the top/bottom.
set virtualedit=onemore,block " Allow cursor to the end of the line (and anywhere in visual-block.)
let g:tmux_navigator_disable_when_zoomed = 1 " Disable Tmux integration when zoomed.

" Grep
set grepprg=rg\ -i\ --vimgrep " Use ripgrep.
set grepformat^=%f:%l:%c:%m

" Mouse
set mouse=a " Enable full mouse support.

" Numbering
set number relativenumber " Show (relative) line numbers.
augroup numbertoggle " Toggle 'relativenumber' on insert.
  autocmd!
  autocmd InsertEnter,BufLeave,WinLeave,FocusLost * nested
            \ if &l:number && empty(&buftype) |
            \ setlocal norelativenumber |
            \ endif
  autocmd InsertLeave,BufEnter,WinEnter,FocusGained * nested
              \ if &l:number && mode() != 'i' && empty(&buftype) |
              \ setlocal relativenumber |
              \ endif
augroup END

" Remote Plugins
let g:loaded_python_provider = 0 " Disable Python 2.
let g:python3_host_prog = $PYENV_ROOT . '/versions/neovim/bin/python' " Locate Python 3 venv.

" Search
set ignorecase smartcase " Ignore case when searching, unless a uppercase letter is present.
noremap <expr> <plug>(slash-after) 'zz'.slash#blink(2, 50)| " Center/blink after search.

" Status
set noshowmode showtabline=2 " Hide mode, always show tabline.

" Splits
set splitright splitbelow " Open vertical splits to the right, horizontal below.
let g:obvious_resize_run_tmux = 1 " Enable Tmux resizing integration.

" Sneak
let g:sneak#s_next = 1 " Enable 'clever s' jumping.
let g:sneak#f_reset = 1 " Set ; and , when f is used...
let g:sneak#t_reset = 1 " ...same for t.
let g:sneak#absolute_dir = 1 " Make ; and , move in a consistent direction.

" Substitution
set inccommand=split " Show incomplete substitutions in a preview split.

" Syntax
let g:go_highlight_build_constraints = 1
let g:python_highlight_all = 1

" Terminal
let $GIT_EDITOR = 'git-editor -cc split' " Open commits in a split.

" Whitespace
set list listchars=tab:→·,nbsp:·,trail:~,extends:»,precedes:« " Show hidden characters.
set showbreak=>\  " Show a character for wrapped lines.
let g:indentLine_char = '┊' " Use a small line to show space-based indentation.

" Wrapping
set colorcolumn=+1 " Show the wrapping column visually.
set linebreak breakindent " Enable visual line wrapping.

" Other
let g:carbon_now_sh_options = {
      \ 't': g:colors_name,
      \ 'fm': 'Source Code Pro',
      \ }
let g:loaded_matchit = 1 " Disable matchit.
let g:loaded_matchparen = 1 " Disable matchparen.
{'fraction_non_alphanumeric': 0.10173089483997387, 'fraction_numerical': 0.007511430437622469, 'mean_word_length': 3.9514955537590946, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1861158', 'n_tokens_mistral': 2113, 'n_tokens_neox': 2030, 'n_words': 648}