aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj-james2020-11-15 09:12:11 +0000
committerj-james2020-11-15 09:12:11 +0000
commitbfd3af815521f43fed4f51d032c0e2937085ca99 (patch)
tree1bd44e988c425210fad3b97f9da5a993929c74dc
parent8f087f7d8b5490d96baacabbb62ac57354a3ca24 (diff)
Create vim-plug shortcuts
-rw-r--r--README.md9
-rw-r--r--autoload/heresy.vim8
-rw-r--r--doc/heresy.txt10
-rw-r--r--plugin/heresy.vim1
4 files changed, 22 insertions, 6 deletions
diff --git a/README.md b/README.md
index 28e508e..c7ffb74 100644
--- a/README.md
+++ b/README.md
@@ -66,14 +66,17 @@ One further common problem is that `tmux` can change key combination behaviour,
* `F3` and `SHIFT+F3`: Find next and previous occurences.
* `CTRL+H`: Find and replace. `[FIND]` and `[REPLACE]` are prepopulated.
+#### Undoing
+ * `CTRL+Z` or `CTRL+U`: Undo.
+ * `CTRL+Y`: Redo.
+
#### Tab navigation
* `CTRL+T`: Open a new tab.
* `CTRL+TAB`: Cycle to the next tab.
* `CTRL+SHIFT+T`: Cycle to the previous tab.
-#### Undoing
- * `CTRL+Z` or `CTRL+U`: Undo.
- * `CTRL+Y`: Redo.
+#### Plugin updating
+ * `CTRL+U`: Update installed plugins
#### Other text manipulation tricks
* `CTRL+LEFT/RIGHT`: Move cursor per word (works in selection as well).
diff --git a/autoload/heresy.vim b/autoload/heresy.vim
index 57fa852..8af72f9 100644
--- a/autoload/heresy.vim
+++ b/autoload/heresy.vim
@@ -126,6 +126,14 @@ function! g:SetShortcuts()
snoremap <silent> <C-Y> <Esc><C-O><C-R>
endif
+ if g:heresy_plugin_shortcuts == 1
+ " Update plugins
+ inoremap <C-U> <C-O>:PlugUpdate<CR>
+ " Install plugins
+ " TODO: The tab key outputs CTRL+I instead of Tab -_-
+ " inoremap <C-I> <C-O>:PlugInstall<CR>
+ endif
+
if g:heresy_find_shortcuts == 1
" Find
inoremap <C-F> <C-O>/
diff --git a/doc/heresy.txt b/doc/heresy.txt
index 5017388..e602f9d 100644
--- a/doc/heresy.txt
+++ b/doc/heresy.txt
@@ -105,14 +105,17 @@ Finding, replacing
* `F3` and `SHIFT+F3`: Find next and previous occurences.
* `CTRL+H`: Find and replace. `[FIND]` and `[REPLACE]` are prepopulated.
+Undoing
+ * `CTRL+Z` or `CTRL+U`: Undo.
+ * `CTRL+Y`: Redo.
+
Tab navigation
* `CTRL+T`: Open a new tab.
* `CTRL+TAB`: Cycle to the next tab.
* `CTRL+SHIFT+T`: Cycle to the previous tab.
-Undoing
- * `CTRL+Z` or `CTRL+U`: Undo.
- * `CTRL+Y`: Redo.
+Plugin updating
+ * `CTRL+U`: Update installed plugins
Other text manipulation tricks
* `CTRL+LEFT/RIGHT`: Move cursor per word (works in selection as well).
@@ -152,6 +155,7 @@ following: >
let g:heresy_app_shortcuts = 1
let g:heresy_copypaste_shortcuts = 1
let g:heresy_undo_shortcuts = 1
+ let g:heresy_plugin_shortcuts = 1
let g:heresy_find_shortcuts = 1
let g:heresy_line_shortcuts = 1
let g:heresy_tab_shortcuts = 1
diff --git a/plugin/heresy.vim b/plugin/heresy.vim
index 708b80f..827e920 100644
--- a/plugin/heresy.vim
+++ b/plugin/heresy.vim
@@ -15,6 +15,7 @@ let s:settings = {
\ 'app_shortcuts': 1,
\ 'copypaste_shortcuts': 1,
\ 'undo_shortcuts': 1,
+ \ 'plugin_shortcuts': 1,
\ 'find_shortcuts': 1,
\ 'line_shortcuts': 1,
\ 'tab_shortcuts': 1,