<commit_before>" ----------------------------------------------------------------------
" | General Settings                                                   |
" ----------------------------------------------------------------------

" Fix issues with vim and the Fish Shell
if $SHELL =~ 'fish'
  set shell=/bin/sh
endif

" Don't make vim vi-compatibile
set nocompatible

" Enable syntax highlighting
syntax on

" Allow `backspace` in insert mode
set backspace=indent
set backspace+=eol
set backspace+=start

" Set local directories for backup and swap files
set backupdir=~/.config/nvim/null
set directory=~/.config/nvim/null
set undodir=~/.config/nvim/null

" Display incomplete commands
set showcmd

" Display the mode you're in
set showmode

"Avoid all the hit-enter prompts
set shortmess=aAItW

" Handle multiple buffers better
set hidden

" Enhanced command line completion
set wildmenu

" Complete files like a shell
set wildmode=list:longest

" Increase command line history
set history=50

" Enable search highlighting
set hlsearch
set incsearch

" Search case-insensitive
set ignorecase

" Search case-sensitive if expression contains a capital letter
set smartcase

" Show line numbers
set number

" Show cursor position
set ruler

" Turn off line wrapping
set nowrap

" Show 3 lines of context around the cursor.
set scrolloff=3

" Set the terminal's title
set title

" Use visual bell instead of audible bell
set visualbell

" Enable mouse in all modes
set mouse=a

" Show the status line all the time
set laststatus=2

" Set global <TAB> settings
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab

" Use decent folding
set foldmethod=indent

" Files open expanded
set foldlevelstart=50

" Show the status line all the time
set laststatus=2

" Useful status information at bottom of screen
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P

" Always diff using vertical mode
set diffopt+=vertical

" ----------------------------------------------------------------------
" | Plugins                                                            |
" ----------------------------------------------------------------------

" Start Plug bundles
call plug#begin('~/.vim/plugged')
  " Search accross and navigate to files and buffers within the project
  Plug 'ctrlpvim/ctrlp.vim'

  " Perform ag searches and place them in Quickfix menus
  Plug 'rking/ag.vim'

  " Create a file-tree
  Plug 'scrooloose/nerdtree'

  " Help commenting across multiple filetypes
  Plug 'tomtom/tcomment_vim'

  " Perform vim commands surround elements
  Plug 'tpope/vim-surround'

  " Create a seemlessly navigation between vim and tmux panes
  Plug 'christoomey/vim-tmux-navigator'

  " Autocomplete engine
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

  " Display a more complete and beautiful status bar
  Plug 'vim-airline/vim-airline'

  " Provide themes for vim-airline plugin
  Plug 'vim-airline/vim-airline-themes'

  " Provide base16 colorschemes
  Plug 'chriskempson/base16-vim'
call plug#end()

" ----------------------------------------------------------------------
" | Helper Functions                                                   |
" ----------------------------------------------------------------------

function! StripTrailingWhitespaces()
  " Save last search and cursor position
  let searchHistory = @/
  let cursorLine = line('.')
  let cursorColumn = col('.')

  " Strip trailing whitespaces
  %s/\s\+$//e

  " Restore previous search history and cursor position
  let @/ = searchHistory
  call cursor(cursorLine, cursorColumn)
endfunction

" ----------------------------------------------------------------------
" | Automatic Commands                                                 |
" ----------------------------------------------------------------------

if has('autocmd')
  " Automatically reload the configurations from the
  " `~/.vimrc` and `~/.gvimrc` files whenever they are changed
  augroup auto_reload_vim_configs
    autocmd!
    autocmd BufWritePost vimrc source $MYVIMRC

    if has('gui_running')
      autocmd BufWritePost gvimrc source $MYGVIMRC
    endif
  augroup END

  " Automatically set the color scheme
  augroup set_font
    autocmd!

    set guifont=Roboto_for_Powerline:h13
    set linespace=2

    autocmd BufEnter * colorscheme base16_dracula
  augroup END

  " Use javascript syntax for json files
  augroup json
    autocmd!
    au BufRead,BufNewFile *.json set ft=json syntax=javascript
  augroup END

  " Automatically strip the trailing whitespaces when files are saved
  augroup strip_trailing_whitespaces
    " Exclude markdown as it needs to be aware of whitespaces
    let excludedFileTypes = [ 'mkd.markdown' ]

    " Only strip the trailing whitespaces if the file type is
    " not in the excluded file types list
    autocmd!
    autocmd BufWritePre * if index(excludedFileTypes, &ft) < 0 | :call StripTrailingWhitespaces()
  augroup END
endif

" ----------------------------------------------------------------------
" | Key Mappings                                                       |
" ----------------------------------------------------------------------

" Set map leader
let mapleader = "\<Space>"
<commit_msg>nvim: add base16 colorscheme<commit_after>" ----------------------------------------------------------------------
" | General Settings                                                   |
" ----------------------------------------------------------------------

" Fix issues with vim and the Fish Shell
if $SHELL =~ 'fish'
  set shell=/bin/sh
endif

" Don't make vim vi-compatibile
set nocompatible

" Enable syntax highlighting
syntax on

" Allow `backspace` in insert mode
set backspace=indent
set backspace+=eol
set backspace+=start

" Set local directories for backup and swap files
set backupdir=~/.config/nvim/null
set directory=~/.config/nvim/null
set undodir=~/.config/nvim/null

" Display incomplete commands
set showcmd

" Display the mode you're in
set showmode

"Avoid all the hit-enter prompts
set shortmess=aAItW

" Handle multiple buffers better
set hidden

" Enhanced command line completion
set wildmenu

" Complete files like a shell
set wildmode=list:longest

" Increase command line history
set history=50

" Enable search highlighting
set hlsearch
set incsearch

" Search case-insensitive
set ignorecase

" Search case-sensitive if expression contains a capital letter
set smartcase

" Show line numbers
set number

" Show cursor position
set ruler

" Turn off line wrapping
set nowrap

" Show 3 lines of context around the cursor.
set scrolloff=3

" Set the terminal's title
set title

" Use visual bell instead of audible bell
set visualbell

" Enable mouse in all modes
set mouse=a

" Show the status line all the time
set laststatus=2

" Set global <TAB> settings
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab

" Use decent folding
set foldmethod=indent

" Files open expanded
set foldlevelstart=50

" Show the status line all the time
set laststatus=2

" Useful status information at bottom of screen
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P

" Always diff using vertical mode
set diffopt+=vertical

" ----------------------------------------------------------------------
" | Plugins                                                            |
" ----------------------------------------------------------------------

" Start Plug bundles
call plug#begin('~/.vim/plugged')
  " Search accross and navigate to files and buffers within the project
  Plug 'ctrlpvim/ctrlp.vim'

  " Perform ag searches and place them in Quickfix menus
  Plug 'rking/ag.vim'

  " Create a file-tree
  Plug 'scrooloose/nerdtree'

  " Help commenting across multiple filetypes
  Plug 'tomtom/tcomment_vim'

  " Perform vim commands surround elements
  Plug 'tpope/vim-surround'

  " Create a seemlessly navigation between vim and tmux panes
  Plug 'christoomey/vim-tmux-navigator'

  " Autocomplete engine
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

  " Display a more complete and beautiful status bar
  Plug 'vim-airline/vim-airline'

  " Provide themes for vim-airline plugin
  Plug 'vim-airline/vim-airline-themes'

  " Provide base16 colorschemes
  Plug 'chriskempson/base16-vim'
call plug#end()

" ----------------------------------------------------------------------
" | Helper Functions                                                   |
" ----------------------------------------------------------------------

function! StripTrailingWhitespaces()
  " Save last search and cursor position
  let searchHistory = @/
  let cursorLine = line('.')
  let cursorColumn = col('.')

  " Strip trailing whitespaces
  %s/\s\+$//e

  " Restore previous search history and cursor position
  let @/ = searchHistory
  call cursor(cursorLine, cursorColumn)
endfunction

" ----------------------------------------------------------------------
" | Automatic Commands                                                 |
" ----------------------------------------------------------------------

if has('autocmd')
  " Automatically reload the configurations from the
  " `~/.vimrc` and `~/.gvimrc` files whenever they are changed
  augroup auto_reload_vim_configs
    autocmd!
    autocmd BufWritePost vimrc source $MYVIMRC

    if has('gui_running')
      autocmd BufWritePost gvimrc source $MYGVIMRC
    endif
  augroup END

  " Automatically set the color scheme
  augroup set_font
    autocmd!

    set guifont=Roboto_for_Powerline:h13
    set linespace=2

    "Access colors present in 256 colorspace
    let base16colorspace=256
    autocmd BufEnter * colorscheme base16-paraiso
  augroup END

  " Use javascript syntax for json files
  augroup json
    autocmd!
    au BufRead,BufNewFile *.json set ft=json syntax=javascript
  augroup END

  " Automatically strip the trailing whitespaces when files are saved
  augroup strip_trailing_whitespaces
    " Exclude markdown as it needs to be aware of whitespaces
    let excludedFileTypes = [ 'mkd.markdown' ]

    " Only strip the trailing whitespaces if the file type is
    " not in the excluded file types list
    autocmd!
    autocmd BufWritePre * if index(excludedFileTypes, &ft) < 0 | :call StripTrailingWhitespaces()
  augroup END
endif

" ----------------------------------------------------------------------
" | Key Mappings                                                       |
" ----------------------------------------------------------------------

" Set map leader
let mapleader = "\<Space>"

{'fraction_non_alphanumeric': 0.19450436087405046, 'fraction_numerical': 0.005626934258651411, 'mean_word_length': 1.9001903725863476, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7168699', 'n_tokens_mistral': 2945, 'n_tokens_neox': 2733, 'n_words': 979}