Compare commits

...

3 Commits

  1. 37
      ftplugin/sep.vim
  2. 1
      vimrc

37
ftplugin/sep.vim

@ -1,3 +1,5 @@
set foldmethod=manual
function! GetColumn()
let l:line = getline(line('.'))[0:col('.')]
let l:count = count(l:line,b:div) + 1
@ -58,6 +60,41 @@ function! MoveColumn(col)
endfunction
command! -nargs=1 MoveColumn :call MoveColumn(<f-args>)
function! Filter(pattern)
execute "normal! qaqqbqgg\"add"
execute "g!/".a:pattern."/d B"
execute "normal! gg\"aPG\"bpdd"
execute ".,$fold"
execute "g/^\s*$/de"
execute "normal! gg"
endfunction
command! -nargs=1 Filter :call Filter(<f-args>)
function! DeleteColumn()
execute "normal! mm"
execute "normal! /".b:div."\\|^\\$\<CR>"
execute "normal! `mNgg\<C-V>Gnhx"
endfunction
command! -nargs=0 Delete :call DeleteColumn()
function CanApps()
execute "normal! mm"
execute "normal! /".b:div."\\|^\\$\<CR>"
execute "normal! `mNggw\<C-V>GIhttps://canapps.sanger.ac.uk/action/Cancer_Pipeline_Logs?id=\<Esc>"
endfunction
command! CanApps :call CanApps()
function UnFilter()
execute "normal! zE"
endfunction
command! UnFilter :call UnFilter()
function! SepFoldText()
return repeat("-", winwidth(0))
endfunction
setlocal foldtext=SepFoldText()
execute "normal! :nnoremap <buffer> <tab> /" . b:div . "<CR>l:noh<CR>\<CR>"
execute "normal! :nnoremap <buffer> <s-tab> /" . b:div . "<CR>NNl:noh<CR>\<CR>"

1
vimrc

@ -93,6 +93,7 @@ let g:ale_lint_on_save = 1
let g:ale_fix_on_save = 0
let g:ale_python_auto_virtualenv = 1
let g:python_highlight_all = 1
let g:slime_target = "tmux"
" mappings
nnoremap <expr> x ((foldclosed('.')==-1)?('x'):('zo0x'))

Loading…
Cancel
Save