From e0f4b6008ecdea34338ec8e5cca5ddb65e6c7b42 Mon Sep 17 00:00:00 2001 From: Caleb Taylor Date: Wed, 7 Aug 2019 11:08:09 -0700 Subject: [PATCH] info on what was added --- README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/README.md b/README.md index 52c4f231..20f1914f 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,71 @@ To install for multiple users, the repository needs to be cloned to a location a sh ~/.vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime user0 user1 user2 # to install for all users with home directories sh ~/.vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime --all + +## What's Added? + +basic.vim + + let mapleader = " " + + " Treat long lines as break lines (useful when moving around in them) + map j gj + map k gk + + " Remap VIM ESC to normal mode from insert mode using jj + " only issue when you need to literally type two jj's in insert mode therefore you must type slowly + imap jj + + " Just like traditional Select All, Ctrl+a + map ggVG + + " Remap VIM H to first non-blank character + map H ^ + " Remap VIM L to last blank character + map L $ + + " Clears highlighting + map :noh + + " Replace word by occurence, press '.' to move to the next occurence which auto replaces with new word. I use it to rename variables. So far I haven't found a mapping that does it by scope reliably like vscode. + nnoremap gr *``cgn + + + " This loop remaps all 'alt key + character' to '\e + character' + " On my vim(windows, but some other windows users didn't have a problem) + " it won't recognize the Meta key when Alt is pressed + " https://vi.stackexchange.com/questions/2350/how-to-map-alt-key/2363 + + " for i in range(97,122) + " let c = nr2char(i) + " execute "set =\e".c."" + " " On the 'j' iteration it would look like this + " " --> execute \"set =\ej" + " endfor + + " These two mappings are a quality of life improvement of copy/pasting from the clipboard + " Effectively this paste map applies the indent within the pasted content from the indent level that you're at when you invoke the pasting + " http://tilvim.com/2014/03/18/a-better-paste.html + map p :set pasteo"*]p:set nopaste + vmap y "+y + + " map pp :setlocal paste! + +plugins_config.vim + + let g:EasyMotion_do_mapping = 0 " Disable default mappings + + " Jump to anywhere you want with minimal keystrokes, with just one key binding. + " `s{char}{label}` + nmap s (easymotion-overwin-f) + " or + " `s{char}{char}{label}` + " Need one more keystroke, but on average, it may be more comfortable. + nmap s (easymotion-overwin-f2) + + " Turn on case-insensitive feature + let g:EasyMotion_smartcase = 1 + + " JK motions: Line motions + map j (easymotion-j) + map k (easymotion-k)