aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--X11/openbox/rc.xml3
-rw-r--r--alias5
-rw-r--r--misc/tmux.conf17
-rw-r--r--vim/init.vim2
-rw-r--r--vim/init/basic.vim11
-rw-r--r--vim/init/highlight.vim4
-rw-r--r--vim/init/keymaps.vim10
-rw-r--r--vim/mini.lua9
8 files changed, 44 insertions, 17 deletions
diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml
index 4b13081..652c003 100644
--- a/X11/openbox/rc.xml
+++ b/X11/openbox/rc.xml
@@ -111,7 +111,8 @@
111 alacritty --title @OPENBOX_CONFIG \ 111 alacritty --title @OPENBOX_CONFIG \
112 -o "window.dimensions.lines=32" \ 112 -o "window.dimensions.lines=32" \
113 -o "window.dimensions.columns=70" \ 113 -o "window.dimensions.columns=70" \
114 -e nvim ~/.config/openbox/rc.xml \ 114 -e nvim ~/.config/openbox/rc.xml;
115 openbox --reconfigure
115 ' 116 '
116 </command> 117 </command>
117 </action> 118 </action>
diff --git a/alias b/alias
index 1d9ff8d..e40ef38 100644
--- a/alias
+++ b/alias
@@ -56,7 +56,7 @@ alias vr='vim -R'
56# Edit last file 56# Edit last file
57alias vl="vim -c 'norm '" 57alias vl="vim -c 'norm '"
58# Use Telescope to select recent files 58# Use Telescope to select recent files
59vll() { nvim -c 'Telescope oldfiles'; } 59vll() { vim -c 'Telescope oldfiles'; }
60# Apply defaut session 60# Apply defaut session
61alias vS="vim -S /tmp/vim.session" 61alias vS="vim -S /tmp/vim.session"
62alias cdv='cd ~/.config/nvim' 62alias cdv='cd ~/.config/nvim'
@@ -199,6 +199,7 @@ file.size() {
199} 199}
200highlight() { grep --color -E "$1|\$"; } 200highlight() { grep --color -E "$1|\$"; }
201alias iso8601='date --iso-8601=minutes' 201alias iso8601='date --iso-8601=minutes'
202# Make file undeletable
202alias lock='sudo chattr +i' 203alias lock='sudo chattr +i'
203# Reset clock 204# Reset clock
204date.reset() { 205date.reset() {
@@ -561,6 +562,6 @@ vvv() {
561 if [ $? -ne 0 ]; then 562 if [ $? -ne 0 ]; then
562 break 563 break
563 fi 564 fi
564 echo "restarting nvim..."; 565 echo "restarting vim...";
565 done 566 done
566} 567}
diff --git a/misc/tmux.conf b/misc/tmux.conf
index 0806bbf..70c3188 100644
--- a/misc/tmux.conf
+++ b/misc/tmux.conf
@@ -1,21 +1,28 @@
1set -g default-terminal "tmux-256color" 1set -g default-terminal "tmux-256color"
2set -ag terminal-overrides ",xterm-256color:RGB" 2set -ag terminal-overrides ",xterm-256color:RGB"
3set -sg escape-time 0
3 4
5# Use Ctrl-G for prefix
4unbind C-b 6unbind C-b
5set-option -g prefix C-g 7set-option -g prefix C-g
6bind-key C-g send-prefix 8bind-key C-g send-prefix
9
7set-option -gw xterm-keys on 10set-option -gw xterm-keys on
11
12# Tab key
8bind-key -nr C-_ send-keys C-/ 13bind-key -nr C-_ send-keys C-/
9 14
10new-session # Start a new session if none available 15new-session # Start a new session if none available
16
11bind N new-session 17bind N new-session
12bind-key -n C-F3 set-option -g status #Ctrl+F3 Combo 18bind-key -n C-F3 set-option -g status #Ctrl+F3 Combo
13 19
14bind k copy-mode 20bind k copy-mode
21bind-key T swap-window -t 0
15 22
16set -sg escape-time 0 23bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
17 24
18#bind C-q select-layout even-horizontal 25bind C-q select-layout even-horizontal
19#bind C-w select-layout even-vertical 26bind C-w select-layout even-vertical
20#bind C-e select-layout main-horizontal 27bind C-e select-layout main-horizontal
21#bind C-r select-layout main-vertical 28bind C-r select-layout main-vertical
diff --git a/vim/init.vim b/vim/init.vim
index 59be77e..7e33b6a 100644
--- a/vim/init.vim
+++ b/vim/init.vim
@@ -31,4 +31,4 @@ endif
31 31
32LoadScript init/highlight.vim 32LoadScript init/highlight.vim
33 33
34source ~/.projects.vim 34silent source ~/.projects.vim
diff --git a/vim/init/basic.vim b/vim/init/basic.vim
index 37e0abf..79ed3fd 100644
--- a/vim/init/basic.vim
+++ b/vim/init/basic.vim
@@ -101,7 +101,10 @@ set matchtime=2
101set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c 101set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
102set laststatus=2 " Always show the status line 102set laststatus=2 " Always show the status line
103set ruler " Show cursor position 103set ruler " Show cursor position
104set wildmenu wildoptions=pum,fuzzy 104set wildmenu
105if has('nvim')
106 set wildoptions=pum,fuzzy
107endif
105 108
106" Format of error message 109" Format of error message
107set errorformat+=[%f:%l]\ ->\ %m,[%f:%l]:%m 110set errorformat+=[%f:%l]\ ->\ %m,[%f:%l]:%m
@@ -110,7 +113,11 @@ set errorformat+=[%f:%l]\ ->\ %m,[%f:%l]:%m
110set splitright 113set splitright
111 114
112" Set signcolumn 115" Set signcolumn
113set signcolumn=yes:3 116if has('nvim')
117 set signcolumn=yes:3
118else
119 set signcolumn=3
120endif
114" Custom sign from help page :h sign 121" Custom sign from help page :h sign
115sign define piet text=>> texthl=Search 122sign define piet text=>> texthl=Search
116 123
diff --git a/vim/init/highlight.vim b/vim/init/highlight.vim
index 22fe5a3..01f74b8 100644
--- a/vim/init/highlight.vim
+++ b/vim/init/highlight.vim
@@ -2,7 +2,9 @@
2hi LuaParen ctermfg=NONE ctermbg=darkgrey cterm=NONE 2hi LuaParen ctermfg=NONE ctermbg=darkgrey cterm=NONE
3 3
4" Show trailing spaces 4" Show trailing spaces
5match ExtraWhitespace /\s\+$/ 5if has('nvim')
6 match ExtraWhitespace /\s\+$/
7endif
6hi ExtraWhitespace ctermbg=red guibg=red 8hi ExtraWhitespace ctermbg=red guibg=red
7 9
8hi CursorLine guibg=NONE 10hi CursorLine guibg=NONE
diff --git a/vim/init/keymaps.vim b/vim/init/keymaps.vim
index bf3d7ab..2d58fe9 100644
--- a/vim/init/keymaps.vim
+++ b/vim/init/keymaps.vim
@@ -46,10 +46,12 @@ nnoremap q: :
46" WORKING_DIR {{{ 46" WORKING_DIR {{{
47 47
48let g:last_path = execute("pwd") 48let g:last_path = execute("pwd")
49augroup SaveLatestDir 49if has('nvim')
50 au! 50 augroup SaveLatestDir
51 autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0] 51 au!
52augroup END 52 autocmd DirChangedPre * let g:last_path = split(execute('pwd'), "\n")[0]
53 augroup END
54endif
53 55
54" Switch CWD to the directory of the open buffer 56" Switch CWD to the directory of the open buffer
55nnoremap cd :cd %:p:h<CR>:pwd<CR> 57nnoremap cd :cd %:p:h<CR>:pwd<CR>
diff --git a/vim/mini.lua b/vim/mini.lua
index 0658d4d..177d80a 100644
--- a/vim/mini.lua
+++ b/vim/mini.lua
@@ -642,7 +642,14 @@ require("lazy").setup({
642 vim.keymap.set( 642 vim.keymap.set(
643 "n", 643 "n",
644 "<leader>sF", 644 "<leader>sF",
645 "<cmd>Telescope find_files follow=true no_ignore=true hidden=true<CR>", 645 function()
646 require("telescope.builtin").find_files({
647 follow = ture,
648 no_ignore = true,
649 hidden = true,
650 file_ignore_patterns = {},
651 })
652 end,
646 { desc = "telescope find all files" } 653 { desc = "telescope find all files" }
647 ) 654 )
648 vim.keymap.set("n", "<leader>sg", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" }) 655 vim.keymap.set("n", "<leader>sg", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })