From 6b5999ede6beb390c948f48abd21b24aa3bd33f8 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 24 Aug 2023 12:28:43 +0200 Subject: [PATCH] joplin vimrc --- joplin.vimrc | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 joplin.vimrc diff --git a/joplin.vimrc b/joplin.vimrc new file mode 100644 index 0000000..fbe3139 --- /dev/null +++ b/joplin.vimrc @@ -0,0 +1,75 @@ + +" A .vimrc-like file. At present, very little is supported. +" You can use the commands: +" inoremap +" vnoremap +" nnoremap +" imap +" nmap +" vmap +" unmap +" Because commands are passed directly to CodeMirror's ViM API, +" insert-mode mappings seem to be unable to insert text. + +" HOTKEYS ------------------------------------------------------------------------------------------ +" add lines with double o +nnoremap oo o +nnoremap OO O + +" H and L for end and beginning +nmap H ^ +nmap L $ +vmap H ^ +vmap L $ + +" useful functions for arrow keys +" (and force the user to use `hjkl`) + +" right/left to add/remove a tab in the beginning of the line. +nmap << +nmap >> +" same for visual mode (plus reselecting stuff for visual mode) +vmap >gv + +" up and down move lines up and down +nmap :m -2 +nmap :m +1 +" same for visual mode (plus reselecting stuff for visual mode) +vmap :m -2 +vmap :m +1 + +" resize windows +nnoremap :vertical resize -1 +nnoremap :vertical resize +1 +nnoremap :resize -1 +nnoremap :resize +1 + +nnoremap +map h :noh + +" copy to system clipboard when space is used. (note, install gvim for this) +vnoremap y "+y +nnoremap Y "+Y +nnoremap y "+y +nnoremap yy "+yy + +" don't write the pasted upon stuff in visual mode into the register +vnoremap p pgvy + +map " :vsplit + +map % :split + +nnoremap j :join +nnoremap J :move .-2 :join + +nnoremap s i +nnoremap S i V:m -2 + +nmap kzz +nmap jzz + +nmap # ` +vmap # ` +