summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/firefox/user-overrides.js5
-rw-r--r--files/foot/foot.ini35
-rw-r--r--files/gaming/MangoHud.conf6
-rw-r--r--files/gtk/sway_gtk2
-rw-r--r--files/kitty/kitty.conf18
-rw-r--r--files/kitty/quick-access-session.conf6
-rw-r--r--files/kitty/quick-access-terminal.conf5
-rw-r--r--files/shell/profile8
-rw-r--r--files/sway/config49
-rw-r--r--files/sway/monitors3
-rw-r--r--files/sway/window_rules14
-rw-r--r--files/user-dirs.dirs1
-rw-r--r--files/vim/autoload/Juliana.vim2
-rw-r--r--files/vim/colors/lil_pablo.vim14
-rw-r--r--files/vim/vimrc52
15 files changed, 150 insertions, 70 deletions
diff --git a/files/firefox/user-overrides.js b/files/firefox/user-overrides.js
index c20ae70..2f7b701 100644
--- a/files/firefox/user-overrides.js
+++ b/files/firefox/user-overrides.js
@@ -3,6 +3,11 @@ user_pref("network.http.referer.XOriginTrimmingPolicy", 2);
user_pref("network.http.referer.XOriginPolicy", 0);
user_pref("privacy.resistFingerprinting", true);
user_pref("keyword.enabled", true);
+// https://github.com/arkenfox/user.js/issues/1974 :\
+user_pref("privacy.clearOnShutdown_v2.browsingHistoryAndDownloads", true);
+user_pref("privacy.clearOnShutdown_v2.downloads", true);
+user_pref("privacy.clearSiteData.browsingHistoryAndDownloads", true);
+user_pref("privacy.clearHistory.browsingHistoryAndDownloads", true);
// Greatly increase memory-only cache size.
user_pref("browser.cache.memory.capacity", 524288);
diff --git a/files/foot/foot.ini b/files/foot/foot.ini
new file mode 100644
index 0000000..abfa9aa
--- /dev/null
+++ b/files/foot/foot.ini
@@ -0,0 +1,35 @@
+shell=/bin/bash --login -i
+font=Liberation Mono:size=11
+gamma-correct-blending=yes
+workers=12
+
+[scrollback]
+lines=8192
+
+[tweak]
+delayed-render-lower=11111111
+delayed-render-upper=16666666
+
+[colors]
+cursor=000000 eeeeee
+foreground=eeeeee
+background=000000
+regular0=000000
+regular1=d75f00
+regular2=af5f00
+regular3=ffd75f
+regular4=005f5f
+regular5=ff5f87
+regular6=ffaf00
+regular7=eeeeee
+bright0=808080
+bright1=d78700
+bright2=af8700
+bright3=ffff5f
+bright4=00875f
+bright5=ff8787
+bright6=ffd700
+bright7=ffffff
+selection-foreground=000000
+selection-background=eeeeee
+scrollback-indicator=000000 af8700
diff --git a/files/gaming/MangoHud.conf b/files/gaming/MangoHud.conf
index 1b2a7bd..03b2396 100644
--- a/files/gaming/MangoHud.conf
+++ b/files/gaming/MangoHud.conf
@@ -1,4 +1,4 @@
-gamemode
+#legacy_layout=0
cpu_temp
cpu_mhz
vulkan_driver
@@ -16,8 +16,10 @@ engine_version
wine
winesync
display_server
-resolution
present_mode
+gamemode
+#custom_text=perf level
+#exec=echo -n "$(</sys/class/drm/card0/device/power_dpm_force_performance_level)"
table_columns=4
cellpadding_y=-0.100
font_size=22
diff --git a/files/gtk/sway_gtk b/files/gtk/sway_gtk
index 01c0660..499cbe3 100644
--- a/files/gtk/sway_gtk
+++ b/files/gtk/sway_gtk
@@ -1,3 +1,4 @@
+seat seat0 xcursor_theme Mocu-White-Right
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'adw-gtk3-dark'
@@ -6,5 +7,4 @@ exec_always {
gsettings set $gnome-schema cursor-theme 'Mocu-White-Right'
gsettings set $gnome-schema font-name 'Sans 10'
}
-seat seat0 xcursor_theme Mocu-White-Right
exec_always test -f ~/.Xresources && xrdb -merge ~/.Xresources
diff --git a/files/kitty/kitty.conf b/files/kitty/kitty.conf
index ef80b7c..28cfce4 100644
--- a/files/kitty/kitty.conf
+++ b/files/kitty/kitty.conf
@@ -10,7 +10,7 @@ disable_ligatures always
window_padding_width 1
placement_strategy top-left
-shell /bin/bash --login
+shell /bin/bash --login -i
shell_integration enabled
clear_all_shortcuts yes
@@ -30,14 +30,14 @@ allow_remote_control no
enabled_layouts splits,stack
paste_actions confirm,confirm-if-large
-sync_to_monitor no
+sync_to_monitor yes
# My understanding is that if repaint_delay equates to a refresh rate
# of just under my monitor's that VRR can avoid all tearing.
# ---------------------------------------------------------
# This probably doesn't work out. According to the man page
# repaint_delay is ignored if there is pending input.
# Tearing is still easily observable.
-repaint_delay 7
+repaint_delay 6
input_delay 1
resize_debounce_time 0.025 0.5
@@ -69,21 +69,21 @@ color12 #00875f
color13 #ff8787
color14 #ffd700
color15 #ffffff
-#selection_foreground #${colo.background}
-#selection_background #${colo.color6}
+#background_opacity ${toString colo.alpha}
+selection_foreground #000000
+selection_background #eeeeee
#mark1_foreground #${colo.background}
#mark1_background #${colo.color5}
#mark2_foreground #${colo.background}
#mark2_background #${colo.color6}
#mark3_foreground #${colo.background}
#mark3_background #${colo.color4}
-#background_opacity ${toString colo.alpha}
-#active_border_color #${colo.color4}
+active_border_color #ffaf00
+inactive_border_color #af5f00
#bell_border_color #${colo.color1}
-#inactive_border_color #${colo.color3}
#active_tab_foreground #${colo.background}
#active_tab_background #${colo.color5}
#active_tab_font_style bold-italic
#inactive_tab_foreground #${colo.background}
#inactive_tab_background #${colo.color4}
-#url_color #${colo.color5}
+url_color #ff5f87
diff --git a/files/kitty/quick-access-session.conf b/files/kitty/quick-access-session.conf
new file mode 100644
index 0000000..2f391a9
--- /dev/null
+++ b/files/kitty/quick-access-session.conf
@@ -0,0 +1,6 @@
+layout splits
+launch --var window=main
+#launch --var window=clock --location=vsplit --bias=12.125 bash
+launch --var window=clock --location=vsplit --bias=12.125 /home/andrew/c/clock/clock 17
+focus_matching_window var:window=main
+#focus_matching_window var:window=clock
diff --git a/files/kitty/quick-access-terminal.conf b/files/kitty/quick-access-terminal.conf
new file mode 100644
index 0000000..b359160
--- /dev/null
+++ b/files/kitty/quick-access-terminal.conf
@@ -0,0 +1,5 @@
+lines 18
+background_opacity 0.965
+output_name DP-1
+kitty_override startup_session=quick-access-session.conf
+kitty_override placement_strategy=bottom-right
diff --git a/files/shell/profile b/files/shell/profile
index f0f0cac..66b20a7 100644
--- a/files/shell/profile
+++ b/files/shell/profile
@@ -4,4 +4,10 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
-#export MAIN_MONITOR=DP-1
+# Why aren't these set? elogind?
+# https://wiki.gentoo.org/wiki/Configuring_a_system_without_elogind
+export XDG_CACHE_HOME="/mnt/ssd/cache"
+#export XDG_CONFIG_HOME="${HOME}/.config"
+#export XDG_DATA_HOME="${HOME}/.local/share"
+#export XDG_STATE_HOME="${HOME}/.local/state"
+#export MAIN_MONITOR=DP-2
diff --git a/files/sway/config b/files/sway/config
index 93327b2..102f69b 100644
--- a/files/sway/config
+++ b/files/sway/config
@@ -6,7 +6,9 @@ set $down j
set $up k
set $right l
-set $term kitty -1
+#set $term kitty -1
+#set $quake kitten quick-access-terminal
+set $term footclient
set $menu dmenu-path | bemenu-colored | xargs swaymsg exec --
font pango:monospace 10
@@ -21,6 +23,7 @@ floating_modifier $mod1 normal
bindsym $mod1+Shift+q kill
bindsym $mod1+Return exec $term
+#bindsym $mod1+backslash exec $quake
bindsym $mod1+d exec $menu
bindsym $mod1+Shift+c reload
@@ -36,35 +39,40 @@ bindsym $mod1+Shift+$down move down
bindsym $mod1+Shift+$up move up
bindsym $mod1+Shift+$right move right
-workspace 1 output DP-1
-workspace 2 output DP-1
-workspace 3 output DP-1
-workspace 4 output DP-1
-workspace 5 output DP-2
-workspace 6 output DP-2
-workspace 7 output DP-2
-workspace 8 output DP-2
-workspace 9 output HDMI-A-1
+include monitors
+
+workspace 1 output $monitor1
+workspace 2 output $monitor1
+workspace 3 output $monitor1
+workspace 4 output $monitor1
+workspace 5 output $monitor1
+workspace 6 output $monitor2
+workspace 7 output $monitor2
+workspace 8 output $monitor2
+workspace 9 output $monitor2
+workspace 10 output $monitor3
bindsym $mod1+1 workspace number 1
bindsym $mod1+2 workspace number 2
bindsym $mod1+3 workspace number 3
bindsym $mod1+4 workspace number 4
-bindsym $mod4+1 workspace number 5
-bindsym $mod4+2 workspace number 6
-bindsym $mod4+3 workspace number 7
-bindsym $mod4+4 workspace number 8
-bindsym $mod4+5 workspace number 9
+bindsym $mod1+5 workspace number 5
+bindsym $mod4+1 workspace number 6
+bindsym $mod4+2 workspace number 7
+bindsym $mod4+3 workspace number 8
+bindsym $mod4+4 workspace number 9
+bindsym $mod4+5 workspace number 10
bindsym $mod1+Shift+1 move container to workspace number 1
bindsym $mod1+Shift+2 move container to workspace number 2
bindsym $mod1+Shift+3 move container to workspace number 3
bindsym $mod1+Shift+4 move container to workspace number 4
-bindsym $mod4+Shift+1 move container to workspace number 5
-bindsym $mod4+Shift+2 move container to workspace number 6
-bindsym $mod4+Shift+3 move container to workspace number 7
-bindsym $mod4+Shift+4 move container to workspace number 8
-bindsym $mod4+Shift+5 move container to workspace number 9
+bindsym $mod1+Shift+5 move container to workspace number 5
+bindsym $mod4+Shift+1 move container to workspace number 6
+bindsym $mod4+Shift+2 move container to workspace number 7
+bindsym $mod4+Shift+3 move container to workspace number 8
+bindsym $mod4+Shift+4 move container to workspace number 9
+bindsym $mod4+Shift+5 move container to workspace number 10
bindsym $mod1+b splith
bindsym $mod1+v splitv
@@ -108,5 +116,6 @@ exec_always swaymsg 'seat * hide_cursor 4000'
exec dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK MAIN_MONITOR
exec swayidle -w \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
+exec_always pgrep 'foot -s' | xargs -r kill && foot -s
exec mako
exec gentoo-pipewire-launcher restart
diff --git a/files/sway/monitors b/files/sway/monitors
new file mode 100644
index 0000000..b6fa237
--- /dev/null
+++ b/files/sway/monitors
@@ -0,0 +1,3 @@
+set $monitor1 DP-1
+set $monitor2 HDMI-A-1
+set $monitor3 DP-2
diff --git a/files/sway/window_rules b/files/sway/window_rules
index f6ee9ee..22d5138 100644
--- a/files/sway/window_rules
+++ b/files/sway/window_rules
@@ -1,20 +1,24 @@
for_window [shell="xwayland"] title_format "(Xwayland) %title"
-for_window [app_id=kitty] allow_tearing yes
+for_window [app_id=kitty] allow_tearing no
for_window [app_id=gamescope] inhibit_idle fullscreen, allow_tearing yes, floating enable
-for_window [app_id=cmv] inhibit_idle fullscreen, floating enable
-for_window [class=cmv] floating enable
+for_window [app_id=camu_screen] inhibit_idle fullscreen, floating enable
+for_window [class=camu_screen] floating enable
for_window [class=cmv.exe] floating enable
for_window [app_id=mauri] floating enable
for_window [app_id=imv] floating enable
+for_window [app_id=mpv] floating enable
for_window [app_id=Waydroid] floating enable
for_window [title=Parsec] inhibit_idle fullscreen
for_window [class=streaming_client] inhibit_idle fullscreen
-for_window [class=steam_app_.*] inhibit_idle fullscreen, allow_tearing yes
+#for_window [class=steam_app_.*] inhibit_idle fullscreen, allow_tearing yes
+for_window [class=steam_app_.*] inhibit_idle fullscreen
+for_window [app_id=monsterhunterworld.exe] inhibit_idle fullscreen
for_window [app_id=gamescope] inhibit_idle fullscreen, allow_tearing yes, floating enable
for_window [class=.gamescope-wrapped] inhibit_idle fullscreen, allow_tearing yes
for_window [app_id=osu!] inhibit_idle fullscreen, allow_tearing yes
for_window [app_id=cs2] inhibit_idle fullscreen, allow_tearing yes
-for_window [class=Minecraft*] inhibit_idle fullscreen, allow_tearing yes
+#for_window [class=Minecraft*] inhibit_idle fullscreen, allow_tearing yes
+for_window [class=Minecraft*] inhibit_idle fullscreen
for_window [title=Overwatch] inhibit_idle fullscreen, allow_tearing yes
for_window [class=Ryujinx] inhibit_idle fullscreen
for_window [app_id=org.yuzu_emu.yuzu] inhibit_idle fullscreen
diff --git a/files/user-dirs.dirs b/files/user-dirs.dirs
index 9101df1..ecf1739 100644
--- a/files/user-dirs.dirs
+++ b/files/user-dirs.dirs
@@ -6,3 +6,4 @@ XDG_PICTURES_DIR="$HOME/pics"
XDG_PUBLICSHARE_DIR="$HOME/dl/tmp"
XDG_TEMPLATES_DIR="$HOME/dl/tmp"
XDG_VIDEOS_DIR="$HOME/dl/mp4"
+XDG_CACHE_HOME="/mnt/ssd/cache"
diff --git a/files/vim/autoload/Juliana.vim b/files/vim/autoload/Juliana.vim
index 492f3d5..660aa17 100644
--- a/files/vim/autoload/Juliana.vim
+++ b/files/vim/autoload/Juliana.vim
@@ -15,7 +15,6 @@ function! Juliana#CompleteTab(type)
let g:Juliana#stop = 0
return ""
endif
-
if !g:Juliana#stop
" Vanilla <Tab> if we are at the front of a line.
if a:type == "TAB" && col(".") >= col("$") && !pumvisible()
@@ -33,7 +32,6 @@ function! Juliana#CompleteTab(type)
return "\<C-n>"
endif
endif
-
return ""
endfunction
diff --git a/files/vim/colors/lil_pablo.vim b/files/vim/colors/lil_pablo.vim
index 555ac4c..4bc3f61 100644
--- a/files/vim/colors/lil_pablo.vim
+++ b/files/vim/colors/lil_pablo.vim
@@ -10,11 +10,12 @@ set background=dark
hi clear
let g:colors_name = 'lil_pablo'
+" @TODO: 'fg' is not valid for ctermfg/bg, it's 7.
" :%s/gui\(bg\|fg\)=\(#[0-9a-f]*\|NONE\) //g
" :%s/cterm\(bg\|fg\)=\([0-9]*\|NONE\|fg\)\ /cterm\1=\2\ gui\1=##\2##\ /g
" :%s/##NONE##/NONE/g
-hi Normal ctermfg=15 guifg=#ffffff ctermbg=0 guibg=#000000 cterm=NONE
+hi Normal ctermfg=7 guifg=#eeeeee ctermbg=0 guibg=#000000 cterm=NONE
hi Comment ctermfg=8 guifg=#808080 ctermbg=NONE guibg=NONE cterm=NONE
hi Constant ctermfg=9 guifg=#d78700 ctermbg=NONE guibg=NONE cterm=NONE
hi Identifier ctermfg=6 guifg=#ffaf00 ctermbg=NONE guibg=NONE cterm=NONE
@@ -29,12 +30,13 @@ hi Todo ctermfg=0 guifg=#000000 ctermbg=3 guibg=#ffd75f cterm=NONE
hi Conceal ctermfg=8 guifg=#808080 ctermbg=NONE guibg=NONE cterm=NONE
hi Cursor ctermfg=0 guifg=#000000 ctermbg=15 guibg=#ffffff cterm=NONE
hi lCursor ctermfg=0 guifg=#000000 ctermbg=15 guibg=#ffffff cterm=NONE
-hi CursorIM ctermfg=NONE guifg=NONE ctermbg=fg guibg=#eeeeee cterm=NONE
+hi CursorIM ctermfg=NONE guifg=NONE ctermbg=7 guibg=#eeeeee cterm=NONE
hi Title ctermfg=13 guifg=#ff8787 ctermbg=NONE guibg=NONE cterm=bold
hi Directory ctermfg=2 guifg=#af5f00 ctermbg=NONE guibg=NONE cterm=NONE
hi Search ctermfg=0 guifg=#000000 ctermbg=3 guibg=#ffd75f cterm=NONE
hi IncSearch ctermfg=15 guifg=#ffffff ctermbg=NONE guibg=NONE cterm=reverse
-hi NonText ctermfg=12 guifg=#00875f ctermbg=NONE guibg=NONE cterm=bold
+hi NonText cterm=NONE ctermfg=NONE
+"hi NonText ctermfg=12 guifg=#00875f ctermbg=NONE guibg=NONE cterm=bold
hi EndOfBuffer ctermfg=12 guifg=#00875f ctermbg=NONE guibg=NONE cterm=bold
hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#d75f00 cterm=NONE
hi WarningMsg ctermfg=9 guifg=#d78700 ctermbg=NONE guibg=NONE cterm=NONE
@@ -50,7 +52,7 @@ hi VisualNOS ctermfg=NONE guifg=NONE ctermbg=0 guibg=#000000 cterm=underline
hi LineNr ctermfg=8 guifg=#808080 ctermbg=NONE guibg=NONE cterm=NONE
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
-hi MatchParen ctermfg=NONE guifg=NONE ctermbg=6 guibg=#ffaf00 cterm=NONE
+hi MatchParen ctermfg=15 guifg=#ffffff ctermbg=NONE guibg=NONE cterm=NONE
hi ModeMsg ctermfg=NONE guifg=NONE ctermbg=NONE guibg=NONE cterm=bold
hi MoreMsg ctermfg=12 guifg=#00875f ctermbg=NONE guibg=NONE cterm=bold
hi Question ctermfg=10 guifg=#af8700 ctermbg=NONE guibg=NONE cterm=bold
@@ -69,9 +71,9 @@ hi TabLineFill ctermfg=NONE guifg=NONE ctermbg=0 guibg=#000000 cterm=reverse
hi TabLineSel ctermfg=15 guifg=#ffffff ctermbg=0 guibg=#000000 cterm=bold
hi ToolbarLine ctermfg=NONE guifg=NONE ctermbg=0 guibg=#000000 cterm=NONE
hi ToolbarButton ctermfg=0 guifg=#000000 ctermbg=7 guibg=#eeeeee cterm=bold
-hi PmenuMatch ctermfg=fg guifg=#eeeeee ctermbg=8 guibg=#808080 cterm=bold
+hi PmenuMatch ctermfg=7 guifg=#eeeeee ctermbg=8 guibg=#808080 cterm=bold
hi PmenuMatchSel ctermfg=0 guifg=#000000 ctermbg=7 guibg=#eeeeee cterm=bold
-hi Pmenu ctermfg=fg guifg=#eeeeee ctermbg=8 guibg=#808080 cterm=NONE
+hi Pmenu ctermfg=7 guifg=#eeeeee ctermbg=8 guibg=#808080 cterm=NONE
hi PmenuSbar ctermfg=NONE guifg=NONE ctermbg=NONE guibg=NONE cterm=NONE
hi PmenuSel ctermfg=0 guifg=#000000 ctermbg=7 guibg=#eeeeee cterm=NONE
hi PmenuThumb ctermfg=NONE guifg=NONE ctermbg=15 guibg=#ffffff cterm=NONE
diff --git a/files/vim/vimrc b/files/vim/vimrc
index 93d1215..dcf832b 100644
--- a/files/vim/vimrc
+++ b/files/vim/vimrc
@@ -1,3 +1,5 @@
+" @TODO: CullSubprojects from sessions command.
+
" Basic settings.
set nocompatible
set number
@@ -19,6 +21,7 @@ set splitright
set splitbelow
" Stop buffers from jumping when opening buffer selection.
set splitkeep=screen
+"set guicursor=n-v-c:block-Cursor,o:hor50,i-ci:hor15,r-cr:hor30,sm:block-Cursor
set termguicolors
colo lil_pablo
@@ -65,7 +68,6 @@ set title
au BufEnter * let &titlestring=expand("%:t")
" https://github.com/csdvrx/CuteVim/blob/main/.vimrc
-
" Allow distinguishing <C-i> from <Tab> in bindings.
" If using vim rather than neovim, this will disable the ability
" to map <C-h/j/k/l>. Apparently due to vim's lack of "CSI u"
@@ -116,7 +118,7 @@ if isdirectory(expand("~/c"))
endif
" Staggered backups.
- let backup_dir = "/mnt/store/backup/vim"
+ let backup_dir = "/mnt/store/backup/vim//"
if !isdirectory(backup_dir)
let backup_dir = expand("~/c/sessions/backup//")
if !isdirectory(backup_dir)
@@ -139,13 +141,13 @@ packadd vim-gitbranch
packadd vim-asciidoc-folding
packadd Colorizer
"if !empty($NIX_SHELL)
-"packadd lsp
-"call LspAddServer([#{
-"\ name: 'clangd',
-"\ filetype: ['c', 'cpp'],
-"\ path: 'clangd',
-"\ args: ['--background-index']
-"\}])
+" packadd lsp
+" call LspAddServer([#{
+" \ name: 'clangd',
+" \ filetype: ['c', 'cpp'],
+" \ path: 'clangd',
+" \ args: ['--background-index']
+" \}])
"endif
" Custom statusline.
@@ -210,7 +212,7 @@ nmap <silent> \ :call QNameInit(1)<CR>:~
nmap <silent> Y :vertical G<CR>
" Relative :e, :vs, and :s.
-fun OpenBasedOnRelativeArgument(A, CMD)
+function OpenBasedOnRelativeArgument(A, CMD)
" https://stackoverflow.com/a/14348204
let arg = a:A
if arg != ""
@@ -220,13 +222,13 @@ fun OpenBasedOnRelativeArgument(A, CMD)
exe "edit" arg
elseif a:CMD == "VERTICAL_SPLIT"
exe "vsplit" arg
- elseif a:CMD == "SPLIT"
+ elseif a:CMD == "HORIZONTAL_SPLIT"
exe "split" arg
endif
-endfun
+endfunction
command -nargs=* -complete=customlist,RelativeFileComplete E :call OpenBasedOnRelativeArgument("<args>", "EDIT")
command -nargs=* -complete=customlist,RelativeFileComplete VS :call OpenBasedOnRelativeArgument("<args>", "VERTICAL_SPLIT")
-command -nargs=* -complete=customlist,RelativeFileComplete S :call OpenBasedOnRelativeArgument("<args>", "SPLIT")
+command -nargs=* -complete=customlist,RelativeFileComplete HS :call OpenBasedOnRelativeArgument("<args>", "HORIZONTAL_SPLIT")
fun RelativeFileComplete(A,L,P)
let argpath = fnamemodify(a:A, ":h")
if argpath[0] == "~" || argpath[0] == "/"
@@ -244,13 +246,14 @@ fun RelativeFileComplete(A,L,P)
let files[i] = substitute(files[i], curpath, "", "")
let files[i] = substitute(files[i], "^./", "", "")
endif
+ let files[i] = fnameescape(files[i])
endfor
return files
-endfun
+endfunction
" https://stackoverflow.com/a/20564623
cnoreabbrev <expr> e getcmdtype() == ":" && getcmdline() == "e" ? "E" : "e"
cnoreabbrev <expr> vs getcmdtype() == ":" && getcmdline() == "vs" ? "VS" : "vs"
-cnoreabbrev <expr> s getcmdtype() == ":" && getcmdline() == "s" ? "S" : "s"
+cnoreabbrev <expr> hs getcmdtype() == ":" && getcmdline() == "hs" ? "HS" : "hs"
" :no -> :nohlsearch instead of :noremap.
cnoreabbrev <expr> no getcmdtype() == ":" && getcmdline() == "no" ? "nohlsearch" : "no"
@@ -271,25 +274,26 @@ command Hex :%!xxd
command Unhex :%!xxd -r
" https://stackoverflow.com/a/27721306
-"command -nargs=+ Ggr execute 'Ggrep! -q' <q-args>
-command -nargs=+ Ggr execute "silent Ggrep!" <q-args> | botright cwindow | redraw!
+command -nargs=+ Ggr exe "silent Ggrep!" <q-args> | botright cwindow | redraw!
" I had this mapped to <C-i> for the longest time. Sadly with OG vim
" (not neovim) the fix for mapping <Tab> and <C-i> seperately doesn't work.
" Changing this bind as the only concession to be compatible with vim
" seems well worth it.
nnoremap <C-o> :Ggr
-"" https://stackoverflow.com/a/37040415
-function! SyntaxGroup()
- let l:s = synID(line("."), col("."), 1)
- echo synIDattr(l:s, "name") . " -> " . synIDattr(synIDtrans(l:s), "name")
-endfun
-command Syn :call SyntaxGroup()
+command GrepWhitespace :Ggr '[[:blank:]]$'
" https://vi.stackexchange.com/a/456
function! TrimWhitespace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
-endfun
+endfunction
command Trim :call TrimWhitespace()
+
+"" https://stackoverflow.com/a/37040415
+function! SyntaxGroup()
+ let l:s = synID(line("."), col("."), 1)
+ echo synIDattr(l:s, "name") . " -> " . synIDattr(synIDtrans(l:s), "name")
+endfunction
+command Syn :call SyntaxGroup()