From 752a2498aa245be7865ad4f00e1de71d8e79ee3a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 1 Jul 2019 11:02:51 +0200 Subject: fix neovim C-h mapping --- .vim/vimrc | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/.vim/vimrc b/.vim/vimrc index cbadca7..4ccb5f8 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -22,10 +22,10 @@ filetype plugin indent on "autocmd vimenter * NERDTree "Switch windows with keys -nmap :wincmd k -nmap :wincmd j -nmap :wincmd h -nmap :wincmd l +nmap :wincmd k +nmap :wincmd j +nmap :wincmd h +nmap :wincmd l nmap :NERDTreeToggle nmap :TlistToggle @@ -42,3 +42,46 @@ command! MakeTags !ctags -R . "Line number Highlight set nu highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE + +" Command HEXMODE +command -bar Hexmode call ToggleHex() + +" helper function to toggle hex mode +function ToggleHex() + " hex mode should be considered a read-only operation + " save values for modified and read-only for restoration later, + " and clear the read-only flag for now + let l:modified=&mod + let l:oldreadonly=&readonly + let &readonly=0 + let l:oldmodifiable=&modifiable + let &modifiable=1 + if !exists("b:editHex") || !b:editHex + " save old options + let b:oldft=&ft + let b:oldbin=&bin + " set new options + setlocal binary " make sure it overrides any textwidth, etc. + silent :e " this will reload the file without trickeries + "(DOS line endings will be shown entirely ) + let &ft="xxd" + " set status + let b:editHex=1 + " switch to hex editor + %!xxd + else + " restore old options + let &ft=b:oldft + if !b:oldbin + setlocal nobinary + endif + " set status + let b:editHex=0 + " return to normal editing + %!xxd -r + endif + " restore values for modified and read only state + let &mod=l:modified + let &readonly=l:oldreadonly + let &modifiable=l:oldmodifiable +endfunction -- cgit v1.2.3 From 3042f802da94cbeddc80ed912e1a304513d7ebdb Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 1 Jul 2019 11:18:48 +0200 Subject: updated submodules --- .gitmodules | 3 +++ .vim/bundle/nerdtree | 2 +- .vim/bundle/nerdtree-git-plugin | 2 +- .vim/bundle/vim-airline | 2 +- .vim/bundle/vim-airline-themes | 2 +- .vim/bundle/vim-signify | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index d792749..582eadc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule ".vim/bundle/vim-signify"] path = .vim/bundle/vim-signify url = https://github.com/mhinz/vim-signify.git +[submodule ".vim/bundle/Conque-shell"] + path = .vim/bundle/Conque-shell + url = https://github.com/vim-scripts/Conque-Shell.git diff --git a/.vim/bundle/nerdtree b/.vim/bundle/nerdtree index 3c06335..1c803b3 160000 --- a/.vim/bundle/nerdtree +++ b/.vim/bundle/nerdtree @@ -1 +1 @@ -Subproject commit 3c0633578281463638235597d8208612544606ae +Subproject commit 1c803b36f632c151c755456b68101153f407ec5e diff --git a/.vim/bundle/nerdtree-git-plugin b/.vim/bundle/nerdtree-git-plugin index 325a129..0501cdf 160000 --- a/.vim/bundle/nerdtree-git-plugin +++ b/.vim/bundle/nerdtree-git-plugin @@ -1 +1 @@ -Subproject commit 325a1298b0c9d8a4c61388a2f9956a534a9068cd +Subproject commit 0501cdfbe3064d1f2d0987929565bccee5f5a6a5 diff --git a/.vim/bundle/vim-airline b/.vim/bundle/vim-airline index 3abbfab..2db9b27 160000 --- a/.vim/bundle/vim-airline +++ b/.vim/bundle/vim-airline @@ -1 +1 @@ -Subproject commit 3abbfabf55a683699a7587fe02eb9f0ccd60eab7 +Subproject commit 2db9b27e39bfd84cb432e001b4a3f41f633b3b7e diff --git a/.vim/bundle/vim-airline-themes b/.vim/bundle/vim-airline-themes index 01b3098..e6f2332 160000 --- a/.vim/bundle/vim-airline-themes +++ b/.vim/bundle/vim-airline-themes @@ -1 +1 @@ -Subproject commit 01b3098642df1bced40473c924c0b6aa37427fe2 +Subproject commit e6f233231b232b6027cde6aebeeb18d9138e5324 diff --git a/.vim/bundle/vim-signify b/.vim/bundle/vim-signify index f34fea0..ac23bd9 160000 --- a/.vim/bundle/vim-signify +++ b/.vim/bundle/vim-signify @@ -1 +1 @@ -Subproject commit f34fea0eff09d0fb4ec54aec3c07345e6c4486d9 +Subproject commit ac23bd95d5fe0c7a7bf4a331e9d37eb72697c46e -- cgit v1.2.3 From 10fdb8e42066a41d5bcd8a7ccfbb565bcb7c2e4a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 1 Jul 2019 11:24:19 +0200 Subject: terminal with F7 --- .vim/vimrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.vim/vimrc b/.vim/vimrc index 4ccb5f8..fc9a936 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -27,14 +27,15 @@ nmap :wincmd j nmap :wincmd h nmap :wincmd l -nmap :NERDTreeToggle -nmap :TlistToggle +nmap :NERDTreeToggle +nmap :TlistToggle +nmap :terminal "Tab mgmt -nmap :tabclose -nmap :tabprevious -nmap :tabnext -nmap :tabnew +nmap :tabclose +nmap :tabprevious +nmap :tabnext +nmap :tabnew "^] Jump to tag, ^t jump back command! MakeTags !ctags -R . -- cgit v1.2.3 From 33ad08106f2aed67f0bc2f06466bc21412c62b6b Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 1 Jul 2019 13:51:00 +0200 Subject: i3 lock + lockscreen image --- .i3/config | 2 ++ lock.png | Bin 0 -> 1222817 bytes 2 files changed, 2 insertions(+) create mode 100644 lock.png diff --git a/.i3/config b/.i3/config index 0c3e9b3..6a75bcb 100644 --- a/.i3/config +++ b/.i3/config @@ -41,6 +41,8 @@ bindsym $mod+b exec "brave" # kill focused window bindsym $mod+Shift+q kill +bindsym $mod+Shift+w exec "i3lock -i ~/vimconfig/lock.png" + # start dmenu (a program launcher) bindsym $mod+d exec dmenu_run # There also is the (new) i3-dmenu-desktop which only displays applications diff --git a/lock.png b/lock.png new file mode 100644 index 0000000..712528b Binary files /dev/null and b/lock.png differ -- cgit v1.2.3