From 3b9cb8322fd7e8370553cd2dd4d1734a45f1f377 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 18 Jan 2021 20:18:53 +0100 Subject: Removed karlmarks, made it a plugin and readded it --- .gitmodules | 6 ++++++ pack/coderonline/start/vim-karlmarks | 1 + plugin/KarlMarks.vim | 29 ----------------------------- plugin/karlmarks.vim | 7 +++++++ 4 files changed, 14 insertions(+), 29 deletions(-) create mode 160000 pack/coderonline/start/vim-karlmarks delete mode 100644 plugin/KarlMarks.vim create mode 100644 plugin/karlmarks.vim diff --git a/.gitmodules b/.gitmodules index b446fde..857c94c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -67,3 +67,9 @@ [submodule "pack/_all/start/deoplete.nvim"] path = pack/_all/start/deoplete.nvim url = https://github.com/Shougo/deoplete.nvim.git +[submodule "vim-karlmarks"] + path = vim-karlmarks + url = http://git.entwicklerseite.de/vim-karlmarks +[submodule "pack/coderonline/start/vim-karlmarks"] + path = pack/coderonline/start/vim-karlmarks + url = http://git.entwicklerseite.de/vim-karlmarks diff --git a/pack/coderonline/start/vim-karlmarks b/pack/coderonline/start/vim-karlmarks new file mode 160000 index 0000000..9747ae4 --- /dev/null +++ b/pack/coderonline/start/vim-karlmarks @@ -0,0 +1 @@ +Subproject commit 9747ae42e4201b0991152d45a604b81c01d3e81c diff --git a/plugin/KarlMarks.vim b/plugin/KarlMarks.vim deleted file mode 100644 index f0699e1..0000000 --- a/plugin/KarlMarks.vim +++ /dev/null @@ -1,29 +0,0 @@ -let g:markerbar_additional = '"' " position in buffer when left -let g:markerbar_additional .= '<>' " start/end last selection -let g:markerbar_additional .= '{}' " start/end paragraph -let g:markerbar_additional .= '()' " start/end sentence -let g:markerbar_additional .= '[]' " start/end sentence -let g:markerbar_additional .= '.' " last change -let g:markerbar_additional .= "^" " insert mode stopped -let g:markerbar_additional .= "'`" - -function! KarlMarks() - for c in map(split(g:markerbar_additional, '\zs'), "char2nr(v:val)") + - \ range(char2nr('a'), char2nr('z')) + - \ range(char2nr('A'), char2nr('Z')) + - \ range(char2nr('0'), char2nr('9')) - - let p = getpos("'".nr2char(c)) - - if (p[0] == 0 || p[0] == winbufnr(0)) && p[1] > 0 - exec "sign unplace ".c - exec "sign define mark_".c." text=".nr2char(c)." texthl=SignColumn" - exec "sign place ".c." name=mark_".c." line=".p[1]." buffer=".winbufnr(0) - endif - endfor -endfunction - -autocmd CursorHold * call KarlMarks() - -" important for distraction free reading while changing windows -" setlocal signcolumn=yes diff --git a/plugin/karlmarks.vim b/plugin/karlmarks.vim new file mode 100644 index 0000000..9e22144 --- /dev/null +++ b/plugin/karlmarks.vim @@ -0,0 +1,7 @@ +let g:karlmarks = '"' " position in buffer when left +let g:karlmarks .= '{}' " start/end paragraph +let g:karlmarks .= '()' " start/end sentence +let g:karlmarks .= '[]' " start/end sentence +let g:karlmarks .= '.' " last change +let g:karlmarks .= "^" " insert mode stopped +let g:karlmarks .= "'`" -- cgit v1.2.3