<commit_before>" => Header ---------------------- {{{
" File: vimrc.vim
" Author: <NAME> <<EMAIL>>
" Description: My vim/neovim configurations file
" Last Modified: July 07, 2016
" }}}
" => General ---------------------- {{{

" set by default in neovim
set incsearch
set ttyfast
set autoread
set wildmenu
set wildmode=longest:list,full
set hlsearch
set history=1000
set nocompatible
set backspace=2
set smarttab
set autoindent

if has('nvim')
    let s:editor_root=expand("~/.config/nvim/")
    " terminal mode mappings
    tnoremap <Esc> <C-\><C-n>
    tnoremap <C-h> <C-\><C-n><C-w>h
    tnoremap <C-j> <C-\><C-n><C-w>j
    tnoremap <C-k> <C-\><C-n><C-w>k
    tnoremap <C-l> <C-\><C-n><C-w>l
else
    let s:editor_root=expand("~/.vim")
endif

if has("unix")
    let s:uname = system("uname")
    let g:python_host_prog='/usr/bin/python'
    if s:uname == "Darwin\n"
        let g:python_host_prog='/usr/bin/python'
    endif
endif

let mapleader=","   " Change leader key to ,

set mouse=          " Disable mouse usage (all modes)
set showcmd         " Show (partial) command in status line.
set showmatch       " Show matching brackets.
set matchtime=1     " for 1/10th of a second
set ignorecase      " Do case insensitive matching
set smartcase       " Do smart case matching
set autowrite       " Automatically save before commands like :next and :make
set hidden          " Hide buffers when they are abandoned
setglobal modeline
set modelines=3
set scrolloff=3
set showmode
set wrap
set linebreak
set title
set number
set relativenumber
set shell=/bin/bash

" Ignore compiled files
set wildignore=*.o,*~,*.pyc,*.class
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*        " Linux/MacOSX

" when joining lines, don't insert two spaces after punctuation
set nojoinspaces

" Don't redraw while executing macros (good performance config)
set lazyredraw

" How many tenths of a second to blink when matching brackets
set mat=3
set t_vb=
set tm=500
set t_Co=256
set t_ut=

" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowritebackup
set noswapfile

" Default 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
set softtabstop=4
set smartindent

" create undo file to keep history after closing the file
set undofile
set undolevels=100
execute 'set undodir='.fnameescape(s:editor_root."/undo/")

" Remember info about open buffers on close
set viminfo^=%

" change cursor for KDE konsole
if exists('$TMUX')
    let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1;BlinkingCursorEnabled=1\x7\<Esc>\\"
    let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0;BlinkingCursorEnabled=0\x7\<Esc>\\"
else
    let &t_SI = "\<Esc>]50;CursorShape=1;BlinkingCursorEnabled=1\x7"
    let &t_SR = "\<Esc>]50;CursorShape=2;BlinkingCursorEnabled=1\x7"
    let &t_EI = "\<Esc>]50;CursorShape=0;BlinkingCursorEnabled=0\x7"
endif

" Enable Omni completion
set omnifunc=syntaxcomplete#Complete
" }}}
" => Mappings ---------------------- {{{

" view hidden characters like spaces and tabs
nnoremap <F2> :<C-U>setlocal lcs=tab:>-,trail:-,eol:$ list! list? <CR>
" Allow Toggle between tabs - spaces
nmap <F6> :call TabToggle()<cr>

" visual shifting (does not exit Visual mode)
nnoremap <F12> :setlocal relativenumber!<cr>
nnoremap <F11> :setlocal number!<cr>
vnoremap < <gv
vnoremap > >gv

" Move a line of text using leader+[jk] or Comamnd+[jk] on mac
nmap <leader>j mz:m+<cr>'z
nmap <leader>k mz:m-2<cr>'z
vmap <leader>j :m'>+<cr>`<my`>mzgv`yo`z
vmap <leader>k :m'<-2<cr>`>my`<mzgv`yo`z

" switch between characters using leader+[hl]
nmap <leader>l xp
nmap <leader>h xhhp

" Strip trailing white space on save<commit_msg>change cursor in urxvt-256c to underscore in insert mode<commit_after>" => Header ---------------------- {{{
" File: vimrc.vim
" Author: <NAME> <<EMAIL>>
" Description: My vim/neovim configurations file
" Last Modified: July 15, 2016
" }}}
" => General ---------------------- {{{

" set by default in neovim
set incsearch
set ttyfast
set autoread
set wildmenu
set wildmode=longest:list,full
set hlsearch
set history=1000
set nocompatible
set backspace=2
set smarttab
set autoindent

if has('nvim')
    let s:editor_root=expand("~/.config/nvim/")
    " terminal mode mappings
    tnoremap <Esc> <C-\><C-n>
    tnoremap <C-h> <C-\><C-n><C-w>h
    tnoremap <C-j> <C-\><C-n><C-w>j
    tnoremap <C-k> <C-\><C-n><C-w>k
    tnoremap <C-l> <C-\><C-n><C-w>l
else
    let s:editor_root=expand("~/.vim")
endif

if has("unix")
    let s:uname = system("uname")
    let g:python_host_prog='/usr/bin/python'
    if s:uname == "Darwin\n"
        let g:python_host_prog='/usr/bin/python'
    endif
endif

let mapleader=","   " Change leader key to ,

set mouse=          " Disable mouse usage (all modes)
set showcmd         " Show (partial) command in status line.
set showmatch       " Show matching brackets.
set matchtime=1     " for 1/10th of a second
set ignorecase      " Do case insensitive matching
set smartcase       " Do smart case matching
set autowrite       " Automatically save before commands like :next and :make
set hidden          " Hide buffers when they are abandoned
setglobal modeline
set modelines=3
set scrolloff=3
set showmode
set wrap
set linebreak
set title
set number
set relativenumber
set shell=/bin/bash

" Ignore compiled files
set wildignore=*.o,*~,*.pyc,*.class
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*        " Linux/MacOSX

" when joining lines, don't insert two spaces after punctuation
set nojoinspaces

" Don't redraw while executing macros (good performance config)
set lazyredraw

" How many tenths of a second to blink when matching brackets
set mat=3
set t_vb=
set tm=500
set t_Co=256
set t_ut=

" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowritebackup
set noswapfile

" Default 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
set softtabstop=4
set smartindent

" create undo file to keep history after closing the file
set undofile
set undolevels=100
execute 'set undodir='.fnameescape(s:editor_root."/undo/")

" Remember info about open buffers on close
set viminfo^=%

" " change cursor for KDE konsole &term =~ 'xterm-256color'
" if &term =~ "screen-256color"
"     let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1;BlinkingCursorEnabled=1\x7\<Esc>\\"
"     let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0;BlinkingCursorEnabled=0\x7\<Esc>\\"
" else
"     let &t_SI = "\<Esc>]50;CursorShape=1;BlinkingCursorEnabled=1\x7"
"     let &t_SR = "\<Esc>]50;CursorShape=2;BlinkingCursorEnabled=1\x7"
"     let &t_EI = "\<Esc>]50;CursorShape=0;BlinkingCursorEnabled=0\x7"
" endif

" change cursor &term =~ 'rxvt-unicode-256color'
if &term =~ "screen-256color"
    let &t_SI .= "\<Esc>Ptmux;\<Esc>\<Esc>[3 q\<Esc>\\"
    let &t_EI .= "\<Esc>Ptmux;\<Esc>\<Esc>[2 q\<Esc>\\"
else
    " blinking underscore
    let &t_SI .= "\<Esc>[3 q"
    " solid block
    let &t_EI .= "\<Esc>[2 q"
    " 1 or 0 -> blinking block
    " 4 -> solid underscore
endif

" Enable Omni completion
set omnifunc=syntaxcomplete#Complete
" }}}
" => Mappings ---------------------- {{{

" view hidden characters like spaces and tabs
nnoremap <F2> :<C-U>setlocal lcs=tab:>-,trail:-,eol:$ list! list? <CR>
" Allow Toggle between tabs - spaces
nmap <F6> :call TabToggle()<cr>

" visual shifting (does not exit Visual mode)
nnoremap <F12> :setlocal relativenumber!<cr>
nnoremap <F11> :setlocal number!<cr>
vnoremap < <gv
vnoremap > >gv

" Move a line of text using leader+[jk] or Comamnd+[jk] on mac
nmap <leader>j mz:m+<cr>'z
nmap <leader>k mz:m-2<cr>'z
vmap <leader>j :m'>+<cr>`<my`>mzgv`yo`z
vmap <leader>k :m'<-2<cr>`>my`<mzgv`yo`z

" switch between characters using leader+[hl]
nmap <leader>l xp
nmap <leader>h xhhp

" Strip trailing white space on save
{'fraction_non_alphanumeric': 0.15417420522098735, 'fraction_numerical': 0.019643318686999225, 'mean_word_length': 3.6903030303030304, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 137, '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': '1134460', 'n_tokens_mistral': 3048, 'n_tokens_neox': 2808, 'n_words': 821}