]> git.zndr.dk Git - dotfiles.git/commitdiff
Enable jj again
authorJannik ZANDER <jannikz@gmail.com>
Sun, 29 Jul 2018 10:32:48 +0000 (12:32 +0200)
committerJannik ZANDER <jannikz@gmail.com>
Sun, 29 Jul 2018 10:32:48 +0000 (12:32 +0200)
.bashrc
.vim/pack/jaza/opt/mappings/plugin/DisableNonCountedBasicMotions.vim [new file with mode: 0644]
.vim/pack/jaza/start/mappings/plugin/DisableNonCountedBasicMotions.vim [deleted file]
.vim/vimrc

diff --git a/.bashrc b/.bashrc
index 5c46b9726586875089f74ca4f18d2029df551d63..5f0fe02faf1ec144f5f39686b538f3e4b0eb9c15 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -57,3 +57,7 @@ HISTFILE=~/.bash_history.local
 [ -f ~/.bash_aliases ] && . ~/.bash_aliases;
 [ -f ~/.bash_completion ] && . ~/.bash_completion;
 [ -f ~/.bashrc.local ] && . ~/.bashrc.local
+
+export NVM_DIR="$HOME/.nvm"
+[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
+[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
diff --git a/.vim/pack/jaza/opt/mappings/plugin/DisableNonCountedBasicMotions.vim b/.vim/pack/jaza/opt/mappings/plugin/DisableNonCountedBasicMotions.vim
new file mode 100644 (file)
index 0000000..a73f033
--- /dev/null
@@ -0,0 +1,80 @@
+" Notes:
+"   (1) To enhance the ergonomics of this sufficiently to make it practical, at
+"       least, until your brain grows a new lobe dedicated to counting line offsets
+"       in the background while you work, you should either make sure you have
+"       something like the following in your `~/.vimrc`:
+"
+"           set number
+"           if has('autocmd')
+"           augroup vimrc_linenumbering
+"               autocmd!
+"               autocmd WinLeave *
+"                           \ if &number |
+"                           \   set norelativenumber |
+"                           \ endif
+"               autocmd BufWinEnter *
+"                           \ if &number |
+"                           \   set relativenumber |
+"                           \ endif
+"               autocmd VimEnter *
+"                           \ if &number |
+"                           \   set relativenumber |
+"                           \ endif
+"           augroup END
+"           endif
+"
+"       or you have installed a plugin like
+"       (vim-numbers)[https://github.com/myusuf3/numbers.vim].
+"
+"   (2) You might want to relax the constraint for horizontal motions, or
+"       add other motions. You can customize the list of motions by
+"       specifying the keys in the
+"       `g:keys_to_disable_if_not_preceded_by_count` variable. For example,
+"       the following only enforces count-prefixed motions for "j" and "k":
+"
+"         let g:keys_to_disable_if_not_preceded_by_count = ["j", "k"]
+
+function! DisableIfNonCounted(move) range
+    if v:count
+        return a:move
+    else
+        " You can make this do something annoying like:
+           " echoerr "Count required!"
+           " sleep 2
+        return ""
+    endif
+endfunction
+
+function! SetDisablingOfBasicMotionsIfNonCounted(on)
+    let keys_to_disable = get(g:, "keys_to_disable_if_not_preceded_by_count", ["j", "k", "l", "h"])
+    if a:on
+        for key in keys_to_disable
+            execute "noremap <expr> <silent> " . key . " DisableIfNonCounted('" . key . "')"
+        endfor
+        let g:keys_to_disable_if_not_preceded_by_count = keys_to_disable
+        let g:is_non_counted_basic_motions_disabled = 1
+    else
+        for key in keys_to_disable
+            try
+                execute "unmap " . key
+            catch /E31:/
+            endtry
+        endfor
+        let g:is_non_counted_basic_motions_disabled = 0
+    endif
+endfunction
+
+function! ToggleDisablingOfBasicMotionsIfNonCounted()
+    let is_disabled = get(g:, "is_non_counted_basic_motions_disabled", 0)
+    if is_disabled
+        call SetDisablingOfBasicMotionsIfNonCounted(0)
+    else
+        call SetDisablingOfBasicMotionsIfNonCounted(1)
+    endif
+endfunction
+
+command! ToggleDisablingOfNonCountedBasicMotions :call ToggleDisablingOfBasicMotionsIfNonCounted()
+command! DisableNonCountedBasicMotions :call SetDisablingOfBasicMotionsIfNonCounted(1)
+command! EnableNonCountedBasicMotions :call SetDisablingOfBasicMotionsIfNonCounted(0)
+
+DisableNonCountedBasicMotions
\ No newline at end of file
diff --git a/.vim/pack/jaza/start/mappings/plugin/DisableNonCountedBasicMotions.vim b/.vim/pack/jaza/start/mappings/plugin/DisableNonCountedBasicMotions.vim
deleted file mode 100644 (file)
index a73f033..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-" Notes:
-"   (1) To enhance the ergonomics of this sufficiently to make it practical, at
-"       least, until your brain grows a new lobe dedicated to counting line offsets
-"       in the background while you work, you should either make sure you have
-"       something like the following in your `~/.vimrc`:
-"
-"           set number
-"           if has('autocmd')
-"           augroup vimrc_linenumbering
-"               autocmd!
-"               autocmd WinLeave *
-"                           \ if &number |
-"                           \   set norelativenumber |
-"                           \ endif
-"               autocmd BufWinEnter *
-"                           \ if &number |
-"                           \   set relativenumber |
-"                           \ endif
-"               autocmd VimEnter *
-"                           \ if &number |
-"                           \   set relativenumber |
-"                           \ endif
-"           augroup END
-"           endif
-"
-"       or you have installed a plugin like
-"       (vim-numbers)[https://github.com/myusuf3/numbers.vim].
-"
-"   (2) You might want to relax the constraint for horizontal motions, or
-"       add other motions. You can customize the list of motions by
-"       specifying the keys in the
-"       `g:keys_to_disable_if_not_preceded_by_count` variable. For example,
-"       the following only enforces count-prefixed motions for "j" and "k":
-"
-"         let g:keys_to_disable_if_not_preceded_by_count = ["j", "k"]
-
-function! DisableIfNonCounted(move) range
-    if v:count
-        return a:move
-    else
-        " You can make this do something annoying like:
-           " echoerr "Count required!"
-           " sleep 2
-        return ""
-    endif
-endfunction
-
-function! SetDisablingOfBasicMotionsIfNonCounted(on)
-    let keys_to_disable = get(g:, "keys_to_disable_if_not_preceded_by_count", ["j", "k", "l", "h"])
-    if a:on
-        for key in keys_to_disable
-            execute "noremap <expr> <silent> " . key . " DisableIfNonCounted('" . key . "')"
-        endfor
-        let g:keys_to_disable_if_not_preceded_by_count = keys_to_disable
-        let g:is_non_counted_basic_motions_disabled = 1
-    else
-        for key in keys_to_disable
-            try
-                execute "unmap " . key
-            catch /E31:/
-            endtry
-        endfor
-        let g:is_non_counted_basic_motions_disabled = 0
-    endif
-endfunction
-
-function! ToggleDisablingOfBasicMotionsIfNonCounted()
-    let is_disabled = get(g:, "is_non_counted_basic_motions_disabled", 0)
-    if is_disabled
-        call SetDisablingOfBasicMotionsIfNonCounted(0)
-    else
-        call SetDisablingOfBasicMotionsIfNonCounted(1)
-    endif
-endfunction
-
-command! ToggleDisablingOfNonCountedBasicMotions :call ToggleDisablingOfBasicMotionsIfNonCounted()
-command! DisableNonCountedBasicMotions :call SetDisablingOfBasicMotionsIfNonCounted(1)
-command! EnableNonCountedBasicMotions :call SetDisablingOfBasicMotionsIfNonCounted(0)
-
-DisableNonCountedBasicMotions
\ No newline at end of file
index 2060fab71864d70b81106aaa871ec24c8c3c3c24..735d2e3c8201864ea211f2b84150a0963d49905f 100644 (file)
@@ -145,10 +145,10 @@ noremap! <C-e>                <End>
 "noremap <leader>c :bd<CR>
 
 " Normal Mode Mappings
-nnoremap hh                       <nop>
-nnoremap jj                       <nop>
-nnoremap kk                       <nop>
-nnoremap ll                       <nop>
+"nnoremap hh                       <nop>
+"nnoremap jj                       <nop>
+"nnoremap kk                       <nop>
+"nnoremap ll                       <nop>
 nnoremap ;                        :
 nnoremap :                        ;
 nnoremap n                        nzzzv