Browse Source

lazygit

dev
Gregory Leeman 2 months ago
parent
commit
5c026400e6
  1. 37
      ftplugin/sep.vim
  2. 5
      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>"

5
vimrc

@ -17,7 +17,7 @@ Plug 'junegunn/fzf.vim'
Plug 'airblade/vim-gitgutter'
Plug 'godlygeek/tabular'
Plug 'itchyny/lightline.vim'
Plug 'jgdavey/tslime.vim'
Plug 'jpalardy/vim-slime'
Plug 'justinmk/vim-dirvish'
Plug 'roginfarrer/vim-dirvish-dovish'
Plug 'tpope/vim-commentary'
@ -94,8 +94,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:tslime_always_current_session = 1
let g:tslime_always_current_window = 1
let g:slime_target = "tmux"
" mappings
nnoremap <expr> x ((foldclosed('.')==-1)?('x'):('zo0x'))

Loading…
Cancel
Save