From 5c026400e665d005927daea8f3d633cc3534c4ee Mon Sep 17 00:00:00 2001 From: Gregory Leeman Date: Wed, 8 Jan 2025 14:00:36 +0000 Subject: [PATCH] lazygit --- ftplugin/sep.vim | 37 +++++++++++++++++++++++++++++++++++++ vimrc | 5 ++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/ftplugin/sep.vim b/ftplugin/sep.vim index e0cb47e..a73a9df 100644 --- a/ftplugin/sep.vim +++ b/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() +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() + +function! DeleteColumn() + execute "normal! mm" + execute "normal! /".b:div."\\|^\\$\" + execute "normal! `mNgg\Gnhx" +endfunction +command! -nargs=0 Delete :call DeleteColumn() + +function CanApps() + execute "normal! mm" + execute "normal! /".b:div."\\|^\\$\" + execute "normal! `mNggw\GIhttps://canapps.sanger.ac.uk/action/Cancer_Pipeline_Logs?id=\" +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 /" . b:div . "l:noh\" execute "normal! :nnoremap /" . b:div . "NNl:noh\" diff --git a/vimrc b/vimrc index 0139952..c177a57 100644 --- a/vimrc +++ b/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 x ((foldclosed('.')==-1)?('x'):('zo0x'))