<commit_before>" :Less
" turn vim into a pager for psql aligned results 
fun! Less()
  autocmd BufEnter * let &titlestring = 'PSQL Pager'
  set title
  set nocompatible
  set nowrap
  set nowrapscan
  set scrollopt=hor
  set scrollbind
  set nonumber
  set incsearch
  set hlsearch
  set smartcase
  set nostartofline
  set scrolloff=5
  "execute 'above split'
  execute 'new'
  wincmd j
  execute 'silent! 1,1g/List of/d'
  execute 'silent! 1,1g/Table/+1d'
  execute 'silent! 1,2d'
  wincmd k
  execute 'silent! norm! P'
  " resize upper window to one line; two lines are not needed because vim adds separating line

  wincmd j
  execute 'silent! $,$d'
  execute 'silent! $,$d'
  let line_length = max(map(getline(1, '$'), 'len(v:val)'))
  wincmd k
  execute 'silent! norm! P'
  execute "%s/$/\\=repeat(' '," . line_length . "- virtcol('$'))"
  execute "1"
  " resize upper window to two lines
  execute 'resize 2'
  " switch to lower window
  wincmd j

  " switch to lower window and scroll 2 lines down 
  wincmd j
  "execute 'norm! 2'
  " hide statusline in lower window
  set laststatus=0
  " hide contents of upper statusline. editor note: do not remove trailing spaces in next line!
  set statusline=\  
  " arrows do scrolling instead of moving
  nnoremap OC zL
  nnoremap OB 
  nnoremap OD zH
  nnoremap OA 
  nnoremap l zL
  nnoremap j 
  nnoremap h zH
  nnoremap k 
  nnoremap K 20
  nnoremap J 20
  nnoremap L zL
  nnoremap H zH<commit_msg>Silencing command output<commit_after>" :Less
" turn vim into a pager for psql aligned results 
fun! Less()
  autocmd BufEnter * let &titlestring = 'PSQL Pager'
  set title
  set nocompatible
  set nowrap
  set nowrapscan
  set scrollopt=hor
  set scrollbind
  set nonumber
  set incsearch
  set hlsearch
  set smartcase
  set nostartofline
  set scrolloff=5
  "execute 'above split'
  execute 'new'
  wincmd j
  execute 'silent! 1,1g/List of/d'
  execute 'silent! 1,1g/Table/+1d'
  execute 'silent! 1,2d'
  wincmd k
  execute 'silent! norm! P'
  " resize upper window to one line; two lines are not needed because vim adds separating line

  wincmd j
  execute 'silent! $,$d'
  execute 'silent! $,$d'
  let line_length = max(map(getline(1, '$'), 'len(v:val)'))
  wincmd k
  execute 'silent! norm! P'
  execute "silent! %s/$/\\=repeat(' '," . line_length . "- virtcol('$'))"
  execute "1"
  " resize upper window to two lines
  execute 'resize 2'
  " switch to lower window
  wincmd j

  " switch to lower window and scroll 2 lines down 
  wincmd j
  "execute 'norm! 2'
  " hide statusline in lower window
  set laststatus=0
  " hide contents of upper statusline. editor note: do not remove trailing spaces in next line!
  set statusline=\  
  " arrows do scrolling instead of moving
  nnoremap OC zL
  nnoremap OB 
  nnoremap OD zH
  nnoremap OA 
  nnoremap l zL
  nnoremap j 
  nnoremap h zH
  nnoremap k 
  nnoremap K 20
  nnoremap J 20
  nnoremap L zL
  nnoremap H zH
{'fraction_non_alphanumeric': 0.0899830220713073, 'fraction_numerical': 0.012224108658743633, 'mean_word_length': 3.2695652173913046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6837911', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1087, 'n_words': 396}