summary refs log tree commit diff
path: root/.vim/after/plugin/writing.vim
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-12-07 19:15:23 +0100
committerRobert Günzler <r@gnzler.io>2021-01-21 19:39:11 +0100
commit04db98668639cb0b431d50e5963f6b156d728078 (patch)
tree4bec29af1c9c34852e974be06301f74de4802199 /.vim/after/plugin/writing.vim
parent9b8005439ac351ded8f6286aefa2378d25d7add5 (diff)
vim: big update; move lots of things to lua
Diffstat (limited to '')
-rw-r--r--.vim/after/plugin/writing.vim41
1 files changed, 9 insertions, 32 deletions
diff --git a/.vim/after/plugin/writing.vim b/.vim/after/plugin/writing.vim
index a016316..f84cc48 100644
--- a/.vim/after/plugin/writing.vim
+++ b/.vim/after/plugin/writing.vim
@@ -72,13 +72,15 @@ function! s:writing_mode_enter()
     set textwidth=120
     " ALEToggle
     " Grammarous keymaps
-    nmap <Leader>c :GrammarousCheck --lang=de
-    nmap <Leader>gi <Plug>(grammarous-move-to-info-window)
-    nmap <Leader>gr <Plug>(grammarous-remove-error)
-    nmap <Leader>gd <Plug>(grammarous-disable-rule)
-    nmap <Leader>gf <Plug>(grammarous-fixit)
-    nmap <Leader>gn <Plug>(grammarous-move-to-next-error)
-    nmap <Leader>gp <Plug>(grammarous-move-to-previous-error)
+    if exists('g:loaded_grammarous')
+        nmap <leader>l :GrammarousCheck --lang=de
+        nmap <leader>gi <Plug>(grammarous-move-to-info-window)
+        nmap <leader>gr <Plug>(grammarous-remove-error)
+        nmap <leader>gd <Plug>(grammarous-disable-rule)
+        nmap <leader>gf <Plug>(grammarous-fixit)
+        nmap <leader>gn <Plug>(grammarous-move-to-next-error)
+        nmap <leader>gp <Plug>(grammarous-move-to-previous-error)
+    endif
 endfunction
 
 augroup Writing
@@ -88,28 +90,3 @@ augroup Writing
     au User GoyoEnter nested call <SID>goyo_enter()
     au User GoyoLeave nested call <SID>goyo_leave()
 augroup END
-
-" LaTeX
-" let g:vimtex_view_general_viewer
-"             \ = '/Applications/Skim.app/Contents/SharedSupport/displayline'
-" let g:vimtex_view_general_options = '-r @line @pdf @tex'
-
-" " This adds a callback hook that updates Skim after compilation
-" let g:vimtex_latexmk_callback_hooks = ['UpdateSkim']
-" function! UpdateSkim(status)
-"     if !a:status | return | endif
-
-"     let l:out = b:vimtex.out()
-"     let l:tex = expand('%:p')
-"     let l:cmd = [g:vimtex_view_general_viewer, '-r']
-"     if !empty(system('pgrep Skim'))
-"         call extend(l:cmd, ['-g'])
-"     endif
-"     if has('nvim')
-"         call jobstart(l:cmd + [line('.'), l:out, l:tex])
-"     elseif has('job')
-"         call job_start(l:cmd + [line('.'), l:out, l:tex])
-"     else
-"         call system(join(l:cmd + [line('.'), shellescape(l:out), shellescape(l:tex)], ' '))
-"     endif
-" endfunction