Bringing in some of the old stuff for reference
This commit is contained in:
parent
0a5b7aa497
commit
aff90a692c
210
.config/i3/config
Normal file
210
.config/i3/config
Normal file
@ -0,0 +1,210 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
focus_follows_mouse no
|
||||
|
||||
set $mod Mod4
|
||||
set $hyper Shift+Control+Mod1+Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 6
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Before i3 v4.8, we used to recommend this one as the default:
|
||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||
# font, it doesn’t scale on retina/hidpi displays.
|
||||
|
||||
bindsym $hyper+i workspace 2, mode "default"
|
||||
bindsym $hyper+e [class=Thunderbird] focus, mode "default"
|
||||
bindsym $hyper+u [class=Unity] focus, mode "default"
|
||||
bindsym $hyper+v [class=Emacs] focus, mode "default"
|
||||
bindsym $hyper+r [class=jetbrains-rider] focus, mode "default"
|
||||
bindsym $hyper+t workspace 1, mode "default"
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
# bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym $mod+Return exec --no-startup-id ~/dotfiles/scripts/i3_cwd_term.sh
|
||||
bindsym $mod+Shift+Return exec "~/dotfiles/scripts/i3_cwd_term.sh"; exec "i3-msg floating enabled"
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
# bindsym $mod+d exec dmenu_run
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left move workspace to output left
|
||||
bindsym $mod+Right move workspace to output right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# move to next container
|
||||
bindsym $mod+Control+h focus output left;
|
||||
bindsym $mod+Control+j focus parent; focus down;
|
||||
bindsym $mod+Control+k focus parent; focus up;
|
||||
bindsym $mod+Control+l focus output right;
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%; exec --no-startup-id pactl set-sink-mute 0 0
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%; exec --no-startup-id pactl set-sink-mute 0 0
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
|
||||
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+s split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+w layout stacking
|
||||
bindsym $mod+t layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
bindsym $mod+m workspace music
|
||||
bindsym $mod+c workspace 0:chat
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
bindsym $mod+Shift+m move container to workspace music
|
||||
bindsym $mod+Shift+c move container to workspace 0:chat
|
||||
|
||||
bindsym $mod+n workspace next_on_output
|
||||
bindsym $mod+p workspace prev_on_output
|
||||
|
||||
bindsym $mod+Control+1 focus output DP-3
|
||||
bindsym $mod+Control+2 focus output DP-1
|
||||
bindsym $mod+Control+3 focus output DP-0
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+r reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Control+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
bindsym $hyper+l exec --no-startup-id i3lock -i ~/Pictures/wallpaper.png -t ; exec systemctl suspend
|
||||
|
||||
set $resizeAmount 5
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym h resize shrink width $resizeAmount px or $resizeAmount ppt
|
||||
bindsym j resize grow height $resizeAmount px or $resizeAmount ppt
|
||||
bindsym k resize shrink height $resizeAmount px or $resizeAmount ppt
|
||||
bindsym l resize grow width $resizeAmount px or $resizeAmount ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width $resizeAmount px or $resizeAmount ppt
|
||||
bindsym Down resize grow height $resizeAmount px or $resizeAmount ppt
|
||||
bindsym Up resize shrink height $resizeAmount px or $resizeAmount ppt
|
||||
bindsym Right resize grow width $resizeAmount px or $resizeAmount ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
position top
|
||||
}
|
||||
|
||||
|
||||
bindsym $hyper+m exec --no-startup-id ~/dotfiles/scripts/work_setup.sh
|
||||
bindsym $mod+Mod1+m exec --no-startup-id ~/dotfiles/scripts/laptop_setup.sh
|
||||
bindsym $hyper+s exec --no-startup-id ~/dotfiles/scripts/single_monitor.sh
|
||||
bindsym $hyper+k exec --no-startup-id ~/dotfiles/scripts/ergo.sh
|
||||
# bindsym $hyper+k exec --no-startup-id ~/dotfiles/scripts/laptop_setup.sh
|
||||
|
||||
# i3lock -i ~/Pictures/new3.png -t
|
||||
|
||||
for_window [class="Unity" title="Hold On"] floating enable, move container to workspace 4
|
||||
for_window [class="Unity" title="Starting Unity..."] floating enable, move container to workspace 4
|
||||
for_window [class="Teensy"] floating enable
|
||||
# for_window [class="sun-awt-X11-XWindowPeer"][window_type=popup_menu] focus
|
||||
# for_window [class="sun-awt-X11-XFramePeer"] focus
|
59
.config/kak/ranger.kak
Normal file
59
.config/kak/ranger.kak
Normal file
@ -0,0 +1,59 @@
|
||||
# http://ranger.nongnu.org
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
|
||||
define-command ranger-open-on-edit-directory \
|
||||
-docstring 'Start the ranger file system explorer when trying to edit a directory' %{
|
||||
hook global RuntimeError "\d+:\d+: '\w+' (.*): is a directory" %{ evaluate-commands %sh{
|
||||
directory=$kak_hook_param_capture_1
|
||||
echo ranger $directory
|
||||
}}
|
||||
}
|
||||
|
||||
define-command \
|
||||
-params .. -file-completion \
|
||||
-docstring %{ranger [<arguments>]: open the file system explorer to select buffers to open
|
||||
All the optional arguments are forwarded to the ranger utility} \
|
||||
ranger %{ evaluate-commands %sh{
|
||||
if [ -n "${TMUX}" ]; then
|
||||
tmux split-window -h \
|
||||
ranger $@ --cmd " \
|
||||
map <return> eval \
|
||||
fm.execute_console('shell \
|
||||
echo evaluate-commands -client ' + ranger.ext.shell_escape.shell_escape('$kak_client') + ' edit {file} | \
|
||||
kak -p '.format(file=fm.thisfile.path) + ranger.ext.shell_escape.shell_escape('$kak_session') + '; \
|
||||
tmux select-pane -t $kak_client_env_TMUX_PANE') \
|
||||
if fm.thisfile.is_file else fm.execute_console('move right=1')"
|
||||
|
||||
elif [ -n "${STY}" ]; then
|
||||
|
||||
script="/tmp/kak-ranger-${kak_client}-${kak_session}.sh"
|
||||
selections="/tmp/kak-ranger-${kak_client}-${kak_session}.txt"
|
||||
cat > "$script" << EOF
|
||||
#! /usr/bin/env sh
|
||||
cd "$PWD"
|
||||
ranger --choosefiles="$selections" $@
|
||||
while read -r f; do
|
||||
printf %s "evaluate-commands -client '${kak_client}' edit '\"\$f\"'" | kak -p '${kak_session}'
|
||||
done < "$selections"
|
||||
screen -X remove
|
||||
rm -f "$selections" "$script"
|
||||
EOF
|
||||
|
||||
tty="$(ps -o tty ${kak_client_pid} | tail -n 1)"
|
||||
screen -X eval \
|
||||
'split -h' \
|
||||
'focus down' \
|
||||
"screen sh '$script'" \
|
||||
< "/dev/$tty"
|
||||
|
||||
elif [ -n "$WINDOWID" ]; then
|
||||
setsid $kak_opt_termcmd " \
|
||||
ranger $@ --cmd "'"'" \
|
||||
map <return> eval \
|
||||
fm.execute_console('shell \
|
||||
echo evaluate-commands -client ' + ranger.ext.shell_escape.shell_escape('$kak_client') + ' edit {file} | \
|
||||
kak -p '.format(file=fm.thisfile.path) + ranger.ext.shell_escape.shell_escape('$kak_session') + '; \
|
||||
xdotool windowactivate $kak_client_env_WINDOWID') \
|
||||
if fm.thisfile.is_file else fm.execute_console('move right=1')"'"' < /dev/null > /dev/null 2>&1 &
|
||||
fi
|
||||
}}
|
43
.config/kak/word-mode.kak
Normal file
43
.config/kak/word-mode.kak
Normal file
@ -0,0 +1,43 @@
|
||||
declare-user-mode word
|
||||
map global normal w ':enter-user-mode -lock word<ret>'
|
||||
map global word w w -docstring 'select to next word start'
|
||||
map global word W W -docstring 'extend to next word start '
|
||||
map global word b b -docstring 'select to previous word start'
|
||||
map global word B B -docstring 'extend to previous word start'
|
||||
map global word e e -docstring 'select to next word end'
|
||||
map global word E E -docstring 'extend to next word end'
|
||||
map global word q <a-w> -docstring 'select to next WORD start'
|
||||
map global word Q <a-W> -docstring 'extend to next WORD start'
|
||||
map global word v <a-b> -docstring 'select to previous WORD start'
|
||||
map global word V <a-B> -docstring 'extend to previous WORD start'
|
||||
map global word r <a-e> -docstring 'select to next WORD end'
|
||||
map global word R <a-E> -docstring 'extend to next WORD end'
|
||||
|
||||
def -hidden select-next-subword %{
|
||||
exec /[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
|
||||
}
|
||||
def -hidden extend-next-subword %{
|
||||
exec ?[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
|
||||
}
|
||||
def -hidden select-prev-subword %{
|
||||
exec <a-/>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
|
||||
}
|
||||
def -hidden extend-prev-subword
|
||||
%{
|
||||
exec <a-?>[A-Z][a-z]+|[A-Z]+|[a-z]+<ret>
|
||||
}
|
||||
map global word s :select-next-subword<ret> -docstring 'select to next subword'
|
||||
map global word S :extend-next-subword<ret> -docstring 'extend to next subword'
|
||||
map global word a :select-prev-subword<ret> -docstring 'select to previous subword'
|
||||
map global word A :extend-prev-subword<ret> -docstring 'extend to previous subword'
|
||||
|
||||
map global word d d
|
||||
map global word y y
|
||||
map global word h h
|
||||
map global word j j
|
||||
map global word k k
|
||||
map global word l l
|
||||
map global word H H
|
||||
map global word J J
|
||||
map global word K K
|
||||
map global word L L
|
@ -56,6 +56,8 @@ map kitty_mod+j neighboring_window down
|
||||
map kitty_mod+k neighboring_window up
|
||||
map kitty_mod+l neighboring_window right
|
||||
|
||||
map ctrl+y paste_from_clipboard
|
||||
|
||||
map kitty_mod+p previous_tab
|
||||
map kitty_mod+n next_tab
|
||||
map kitty_mod+q close_tab
|
||||
|
86
.config/mbsync/config
Normal file
86
.config/mbsync/config
Normal file
@ -0,0 +1,86 @@
|
||||
IMAPAccount ferano.io
|
||||
Host mail.gandi.net
|
||||
UserCmd "age --decrypt -i ~/.local/credentials/personal ~/.local/credentials/authinfo.age | awk -F ' ' '/mail.gandi.net/ { print $(NF-2);exit; }'"
|
||||
PassCmd "age --decrypt -i ~/.local/credentials/personal ~/.local/credentials/authinfo.age | awk -F ' ' '/mail.gandi.net/ { print $(NF);exit; }'"
|
||||
SSLType IMAPS
|
||||
|
||||
IMAPStore ferano.io.remote
|
||||
Account ferano.io
|
||||
|
||||
MaildirStore ferano.io.local
|
||||
Subfolders Verbatim
|
||||
# The trailing "/" is important
|
||||
Path ~/.mail/ferano.io/
|
||||
Inbox ~/.mail/ferano.io/Inbox
|
||||
|
||||
Channel ferano.io
|
||||
Far :ferano.io.remote:
|
||||
Near :ferano.io.local:
|
||||
# Include everything
|
||||
Patterns *
|
||||
Sync All
|
||||
Create Both
|
||||
Remove Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
|
||||
Channel ferano.io.inbox
|
||||
Far :ferano.io.remote:
|
||||
Near :ferano.io.local:
|
||||
Patterns INBOX
|
||||
Sync All
|
||||
Create Both
|
||||
Remove Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
|
||||
IMAPAccount gmail
|
||||
Host imap.gmail.com
|
||||
UserCmd "age --decrypt -i ~/.local/credentials/personal ~/.local/credentials/authinfo.age | awk -F ' ' '/mail.gmail.com/ { print $(NF-2);exit; }'"
|
||||
PassCmd "age --decrypt -i ~/.local/credentials/personal ~/.local/credentials/authinfo.age | awk -F ' ' '/mail.gmail.com/ { print $(NF);exit; }'"
|
||||
SSLType IMAPS
|
||||
|
||||
IMAPStore gmail.remote
|
||||
Account gmail
|
||||
|
||||
MaildirStore gmail.local
|
||||
Subfolders Verbatim
|
||||
# The trailing "/" is important
|
||||
Path ~/.mail/gmail/
|
||||
Inbox ~/.mail/gmail/Inbox
|
||||
|
||||
Channel gmail
|
||||
Far :gmail.remote:
|
||||
Near :gmail.local:
|
||||
# Include everything
|
||||
Patterns *
|
||||
Sync All
|
||||
Create Both
|
||||
Remove Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
|
||||
Channel gmail.inbox
|
||||
Far :gmail.remote:
|
||||
Near :gmail.local:
|
||||
Patterns INBOX
|
||||
Sync All
|
||||
Create Both
|
||||
Remove Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
|
||||
Channel gmail.allmail
|
||||
Far :gmail.remote:
|
||||
Near :gmail.local:
|
||||
Patterns *All*
|
||||
Sync All
|
||||
Create Both
|
||||
Remove Both
|
||||
Expunge Both
|
||||
SyncState *
|
||||
|
||||
|
||||
Group all
|
||||
Channel ferano.io
|
||||
Channel gmail
|
10
.config/qutebrowser/autoconfig.yml
Normal file
10
.config/qutebrowser/autoconfig.yml
Normal file
@ -0,0 +1,10 @@
|
||||
# If a config.py file exists, this file is ignored unless it's explicitly loaded
|
||||
# via config.load_autoconfig(). For more information, see:
|
||||
# https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc#loading-autoconfigyml
|
||||
# DO NOT edit this file by hand, qutebrowser will overwrite it.
|
||||
# Instead, create a config.py - see :help for details.
|
||||
|
||||
config_version: 2
|
||||
settings:
|
||||
content.notifications.enabled:
|
||||
https://www.reddit.com: false
|
0
.config/qutebrowser/bookmarks/urls
Normal file
0
.config/qutebrowser/bookmarks/urls
Normal file
0
.config/qutebrowser/quickmarks
Normal file
0
.config/qutebrowser/quickmarks
Normal file
19
.config/scripts/add_command.sh
Executable file
19
.config/scripts/add_command.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ];
|
||||
then
|
||||
echo "Provide a command, alternative pass the -l to add the last command in history"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
file=$HOME/School/CCOM4088-CyberSecurity/commands
|
||||
|
||||
|
||||
if [ "$1" = "-l" ]
|
||||
then
|
||||
tail ~/.histfile -n 2 | head -n 1 | sed 's/^.*;//' >> $file
|
||||
else
|
||||
echo "$1" >> $file
|
||||
fi
|
||||
|
||||
tail $file
|
26
.config/scripts/i3_cwd_term.sh
Executable file
26
.config/scripts/i3_cwd_term.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
ACTIVE_WINDOW=$(xdpyinfo | grep focus | cut -f4 -d " ")
|
||||
ACTIVE_WM_CLASS=$(xprop -id $ACTIVE_WINDOW | grep WM_CLASS)
|
||||
if [[ $ACTIVE_WM_CLASS == *"Alacritty"* ]]
|
||||
then
|
||||
# Get PID. If _NET_WM_PID isn't set, bail.
|
||||
PID=$(xprop -id $ACTIVE_WINDOW | grep _NET_WM_PID | grep -oP "\d+")
|
||||
if [[ "$PID" == "" ]]
|
||||
then
|
||||
alacritty
|
||||
fi
|
||||
# Get first child of terminal
|
||||
CHILD_PID=$(pgrep -P $PID)
|
||||
if [[ "$PID" == "" ]]
|
||||
then
|
||||
alacritty
|
||||
fi
|
||||
# Get current directory of child. The first child should be the shell.
|
||||
SHELL_CWD=$(readlink -e "/proc/${CHILD_PID}/cwd")
|
||||
# Start alacritty with the working directory
|
||||
alacritty --working-directory $SHELL_CWD
|
||||
else
|
||||
alacritty
|
||||
fi
|
||||
|
||||
# alacritty --working-directory "$(readlink -e /proc/"$(pgrep -P "$(xdo pid)" | tail -n 1)"/cwd)"
|
6
.config/scripts/laptop_setup.sh
Executable file
6
.config/scripts/laptop_setup.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
xrandr --output DP-0 --primary --mode 1920x1080 --pos 0x0 --panning 1920x1080 --dpi 96 \
|
||||
--output DP-1 --off \
|
||||
--output DP-2 --off \
|
||||
--output DP-3 --off \
|
||||
--output DP-4 --off \
|
13
.config/scripts/single_monitor.sh
Executable file
13
.config/scripts/single_monitor.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
xrandr --output DP-0 --mode 1920x1080 --pos 0x0 --dpi 96 \
|
||||
--output DP-4 --primary --mode 1920x1080 --pos 1920x0 --right-of DP-0 --dpi 96
|
||||
i3-msg "workspace music; move workspace to output DP-0;
|
||||
workspace 0:chat; move workspace to output DP-4;
|
||||
workspace 1; move workspace to output DP-4;
|
||||
workspace 2; move workspace to output DP-4;
|
||||
workspace 3; move workspace to output DP-4;
|
||||
workspace 4; move workspace to output DP-4;
|
||||
workspace 5; move workspace to output DP-4;
|
||||
workspace 6; move workspace to output DP-4;
|
||||
workspace 7; move workspace to output DP-4;
|
||||
workspace 3"
|
17
.config/scripts/work_setup.sh
Executable file
17
.config/scripts/work_setup.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
xrandr \
|
||||
--output HDMI-0 --off \
|
||||
--output DP-4 --off \
|
||||
--output DP-2 --off \
|
||||
--output DP-3 --mode 1920x1080 --pos 0x0 --panning 1920x1080+0+0 --dpi 96 \
|
||||
--output DP-1 --primary --mode 1920x1080 --pos 1920x0 --panning 1920x1080+1920+0 --dpi 96 \
|
||||
--output DP-0 --mode 1920x1080 --pos 3840x0 --panning 1920x1080+3840+0 --dpi 96
|
||||
i3-msg "workspace 1; move workspace to output DP-3;
|
||||
workspace music; move workspace to output DP-0;
|
||||
workspace 0:chat; move workspace to output DP-1;
|
||||
workspace 2; move workspace to output DP-3;
|
||||
workspace 3; move workspace to output DP-1;
|
||||
workspace 4; move workspace to output DP-1;
|
||||
workspace 5; move workspace to output DP-1;
|
||||
workspace 6; move workspace to output DP-1;
|
||||
workspace 3"
|
0
.config/touchegg/.touchegg:0.lock
Normal file
0
.config/touchegg/.touchegg:0.lock
Normal file
140
.config/touchegg/touchegg.conf
Normal file
140
.config/touchegg/touchegg.conf
Normal file
@ -0,0 +1,140 @@
|
||||
<touchégg>
|
||||
|
||||
<settings>
|
||||
<!--
|
||||
Delay, in milliseconds, since the gesture starts before the animation is displayed.
|
||||
Default: 150ms if this property is not set.
|
||||
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
|
||||
displayed if you complete the action quick enough. This property configures that time.
|
||||
-->
|
||||
<property name="animation_delay">50</property>
|
||||
|
||||
<!--
|
||||
Percentage of the gesture to be completed to apply the action. Set to 0 to execute actions unconditionally.
|
||||
Default: 20% if this property is not set.
|
||||
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that, even if the
|
||||
animation is displayed, the action is not executed if you did not move your fingers far
|
||||
enough. This property configures the percentage of the gesture that must be reached to
|
||||
execute the action.
|
||||
-->
|
||||
<property name="action_execute_threshold">15</property>
|
||||
|
||||
<!--
|
||||
Global animation colors can be configured to match your system colors using HEX notation:
|
||||
|
||||
<color>909090</color>
|
||||
<borderColor>FFFFFF</borderColor>
|
||||
|
||||
You can also use auto:
|
||||
|
||||
<property name="color">auto</property>
|
||||
<property name="borderColor">auto</property>
|
||||
|
||||
Notice that you can override an specific animation color.
|
||||
-->
|
||||
<property name="color">auto</property>
|
||||
<property name="borderColor">auto</property>
|
||||
</settings>
|
||||
|
||||
<!--
|
||||
Configuration for every application.
|
||||
-->
|
||||
<application name="All">
|
||||
<gesture type="SWIPE" fingers="3" direction="UP">
|
||||
<action type="MAXIMIZE_RESTORE_WINDOW">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="DOWN">
|
||||
<action type="MINIMIZE_WINDOW">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="RIGHT">
|
||||
<action type="CHANGE_DESKTOP">
|
||||
<direction>auto</direction>
|
||||
<animate>true</animate>
|
||||
<animationPosition>auto</animationPosition>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="LEFT">
|
||||
<action type="CHANGE_DESKTOP">
|
||||
<direction>auto</direction>
|
||||
<animate>true</animate>
|
||||
<animationPosition>auto</animationPosition>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="3" direction="IN">
|
||||
<action type="CLOSE_WINDOW">
|
||||
<animate>true</animate>
|
||||
<color>F84A53</color>
|
||||
<borderColor>F84A53</borderColor>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="4" direction="OUT">
|
||||
<action type="SHOW_DESKTOP">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="4" direction="IN">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>false</repeat>
|
||||
<modifiers>Super_L</modifiers>
|
||||
<keys>A</keys>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="TAP" fingers="2">
|
||||
<action type="MOUSE_CLICK">
|
||||
<button>3</button>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="TAP" fingers="3">
|
||||
<action type="MOUSE_CLICK">
|
||||
<button>2</button>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="LEFT"><action type="GNOME_SHELL"></action></gesture>
|
||||
<gesture type="SWIPE" fingers="3" direction="RIGHT"><action type="GNOME_SHELL"></action></gesture>
|
||||
<gesture type="SWIPE" fingers="3" direction="UP"><action type="GNOME_SHELL"></action></gesture>
|
||||
<gesture type="SWIPE" fingers="3" direction="DOWN"><action type="GNOME_SHELL"></action></gesture>
|
||||
<gesture type="SWIPE" fingers="3" direction="LEFT"><action type="GNOME_SHELL"></action></gesture>
|
||||
<gesture type="SWIPE" fingers="3" direction="RIGHT"><action type="GNOME_SHELL"></action></gesture>
|
||||
</application>
|
||||
|
||||
<!--
|
||||
Configuration for specific applications.
|
||||
-->
|
||||
|
||||
<application name="Google-chrome,Chromium-browser">
|
||||
<gesture type="PINCH" fingers="2" direction="IN">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>true</repeat>
|
||||
<modifiers>Control_L</modifiers>
|
||||
<keys>KP_Subtract</keys>
|
||||
<decreaseKeys>KP_Add</decreaseKeys>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="2" direction="OUT">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>true</repeat>
|
||||
<modifiers>Control_L</modifiers>
|
||||
<keys>KP_Add</keys>
|
||||
<decreaseKeys>KP_Subtract</decreaseKeys>
|
||||
</action>
|
||||
</gesture>
|
||||
</application>
|
||||
|
||||
</touchégg>
|
133
.config/touchegg/touchegg.conf~
Normal file
133
.config/touchegg/touchegg.conf~
Normal file
@ -0,0 +1,133 @@
|
||||
<touchégg>
|
||||
|
||||
<settings>
|
||||
<!--
|
||||
Delay, in milliseconds, since the gesture starts before the animation is displayed.
|
||||
Default: 150ms if this property is not set.
|
||||
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
|
||||
displayed if you complete the action quick enough. This property configures that time.
|
||||
-->
|
||||
<property name="animation_delay">50</property>
|
||||
|
||||
<!--
|
||||
Percentage of the gesture to be completed to apply the action. Set to 0 to execute actions unconditionally.
|
||||
Default: 20% if this property is not set.
|
||||
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that, even if the
|
||||
animation is displayed, the action is not executed if you did not move your fingers far
|
||||
enough. This property configures the percentage of the gesture that must be reached to
|
||||
execute the action.
|
||||
-->
|
||||
<property name="action_execute_threshold">15</property>
|
||||
|
||||
<!--
|
||||
Global animation colors can be configured to match your system colors using HEX notation:
|
||||
|
||||
<color>909090</color>
|
||||
<borderColor>FFFFFF</borderColor>
|
||||
|
||||
You can also use auto:
|
||||
|
||||
<property name="color">auto</property>
|
||||
<property name="borderColor">auto</property>
|
||||
|
||||
Notice that you can override an specific animation color.
|
||||
-->
|
||||
<property name="color">auto</property>
|
||||
<property name="borderColor">auto</property>
|
||||
</settings>
|
||||
|
||||
<!--
|
||||
Configuration for every application.
|
||||
-->
|
||||
<application name="All">
|
||||
<gesture type="SWIPE" fingers="3" direction="UP">
|
||||
<action type="MAXIMIZE_RESTORE_WINDOW">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="DOWN">
|
||||
<action type="MINIMIZE_WINDOW">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="RIGHT">
|
||||
<action type="CHANGE_DESKTOP">
|
||||
<direction>auto</direction>
|
||||
<animate>true</animate>
|
||||
<animationPosition>auto</animationPosition>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="SWIPE" fingers="3" direction="LEFT">
|
||||
<action type="CHANGE_DESKTOP">
|
||||
<direction>auto</direction>
|
||||
<animate>true</animate>
|
||||
<animationPosition>auto</animationPosition>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="3" direction="IN">
|
||||
<action type="CLOSE_WINDOW">
|
||||
<animate>true</animate>
|
||||
<color>F84A53</color>
|
||||
<borderColor>F84A53</borderColor>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="4" direction="OUT">
|
||||
<action type="SHOW_DESKTOP">
|
||||
<animate>true</animate>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="4" direction="IN">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>false</repeat>
|
||||
<modifiers>Super_L</modifiers>
|
||||
<keys>A</keys>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="TAP" fingers="2">
|
||||
<action type="MOUSE_CLICK">
|
||||
<button>3</button>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="TAP" fingers="3">
|
||||
<action type="MOUSE_CLICK">
|
||||
<button>2</button>
|
||||
<on>begin</on>
|
||||
</action>
|
||||
</gesture>
|
||||
</application>
|
||||
|
||||
<!--
|
||||
Configuration for specific applications.
|
||||
-->
|
||||
|
||||
<application name="Google-chrome,Chromium-browser">
|
||||
<gesture type="PINCH" fingers="2" direction="IN">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>true</repeat>
|
||||
<modifiers>Control_L</modifiers>
|
||||
<keys>KP_Subtract</keys>
|
||||
<decreaseKeys>KP_Add</decreaseKeys>
|
||||
</action>
|
||||
</gesture>
|
||||
|
||||
<gesture type="PINCH" fingers="2" direction="OUT">
|
||||
<action type="SEND_KEYS">
|
||||
<repeat>true</repeat>
|
||||
<modifiers>Control_L</modifiers>
|
||||
<keys>KP_Add</keys>
|
||||
<decreaseKeys>KP_Subtract</decreaseKeys>
|
||||
</action>
|
||||
</gesture>
|
||||
</application>
|
||||
|
||||
</touchégg>
|
@ -1,107 +0,0 @@
|
||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||||
;; sync' after modifying this file!
|
||||
|
||||
|
||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||
;; clients, file templates and snippets.
|
||||
(setq user-full-name "Joseph Ferano"
|
||||
user-mail-address "joseph@ctech.com")
|
||||
|
||||
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
|
||||
;; are the three important ones:
|
||||
;;
|
||||
;; + `doom-font'
|
||||
;; + `doom-variable-pitch-font'
|
||||
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||
;; presentations or streaming.
|
||||
;;
|
||||
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
|
||||
;; font string. You generally only need these two:
|
||||
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
|
||||
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
|
||||
|
||||
(setq doom-font (font-spec :family "Fira Code Nerd Font" :size 15))
|
||||
|
||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
(setq doom-theme 'doom-vibrant)
|
||||
;; Also looks nice doom-palenight
|
||||
|
||||
;; If you use `org' and don't want your org files in the default location below,
|
||||
;; change `org-directory'. It must be set before org loads!
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
(setq display-line-numbers-type 'relative)
|
||||
|
||||
|
||||
;; Here are some additional functions/macros that could help you configure Doom:
|
||||
;;
|
||||
;; - `load!' for loading external *.el files relative to this one
|
||||
;; - `use-package!' for configuring packages
|
||||
;; - `after!' for running code after a package has loaded
|
||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
||||
;; this file. Emacs searches the `load-path' when you load packages with
|
||||
;; `require' or `use-package'.
|
||||
;; - `map!' for binding new keys
|
||||
;;
|
||||
;; To get information about any of these functions/macros, move the cursor over
|
||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
||||
;; This will open documentation for it, including demos of how they are used.
|
||||
;;
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
|
||||
(setq default-directory "~/")
|
||||
|
||||
(setq which-key-idle-delay 0.4)
|
||||
|
||||
(setq dired-listing-switches "-ahlgo -v --group-directories-first")
|
||||
|
||||
(setq recentf-max-saved-items 1000)
|
||||
|
||||
(defun joe/dired-same-buffer ()
|
||||
"In Dired, visit this file or directory in another window."
|
||||
(interactive)
|
||||
(find-alternate-file ".."))
|
||||
|
||||
(defun joe/dired-open-with-wsl-open ()
|
||||
"Open file under cursor with wsl-open which should launch it on the windows side"
|
||||
(interactive)
|
||||
(shell-command (format "open '%s'" (dired-get-filename))))
|
||||
|
||||
(map!
|
||||
(:n "-" #'dired-jump
|
||||
:n "C-l" #'evil-window-right
|
||||
:n "C-h" #'evil-window-left)
|
||||
(:after flycheck
|
||||
:map flycheck-mode-map
|
||||
:leader "e" #'flycheck-explain-error-at-point)
|
||||
(:after dired
|
||||
:map dired-mode-map
|
||||
:n "o" #'joe/dired-open-with-wsl-open
|
||||
:n "s" #'dired-sort-toggle-or-edit
|
||||
:n "-" #'joe/dired-same-buffer
|
||||
:n "RET" #'dired-find-alternate-file)
|
||||
(:after avy
|
||||
:n "q" #'avy-goto-word-0))
|
||||
|
||||
(require 'avy)
|
||||
(defvar avy-map (make-sparse-keymap))
|
||||
|
||||
(use-package! avy
|
||||
:init
|
||||
(setq avy-keys '(?a ?s ?d ?f ?w ?e ?r ?u ?i ?o ?h ?j ?k ?l ?x ?c ?m ?z ?p ?q ?t ?y ?b ?n))
|
||||
(setq avy-all-windows nil)
|
||||
(setq avy-background t))
|
||||
|
||||
(use-package! org-bullets
|
||||
:hook (org-mode . org-bullets-mode))
|
||||
|
||||
(use-package! company
|
||||
:after
|
||||
(add-to-list 'company-backends 'company-restclient))
|
191
.doom.d/init.el
191
.doom.d/init.el
@ -1,191 +0,0 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a "Module Index" link where you'll find
|
||||
;; a comprehensive list of Doom's modules and what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
vc-gutter ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere) ; come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
(dired +dirvish) ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
;;docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
(lsp +peek) ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
cc ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
(fsharp +lsp) ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
;;python ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
(racket +lsp +xp) ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
;;yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
@ -1,58 +0,0 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
;; https://github.com/raxod502/straight.el#the-recipe-format
|
||||
;(package! another-package
|
||||
; :recipe (:host github :repo "username/repo"))
|
||||
|
||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||
;; `:files' in the `:recipe':
|
||||
;(package! this-package
|
||||
; :recipe (:host github :repo "username/repo"
|
||||
; :files ("some-file.el" "src/lisp/*.el")))
|
||||
|
||||
;; If you'd like to disable a package included with Doom, you can do so here
|
||||
;; with the `:disable' property:
|
||||
;(package! builtin-package :disable t)
|
||||
|
||||
;; You can override the recipe of a built in package without having to specify
|
||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||
;(package! builtin-package :recipe (:nonrecursive t))
|
||||
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||
|
||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||
;; This is required for some packages whose default branch isn't 'master' (which
|
||||
;; our package manager can't deal with; see raxod502/straight.el#279)
|
||||
;(package! builtin-package :recipe (:branch "develop"))
|
||||
|
||||
;; Use `:pin' to specify a particular commit to install.
|
||||
;(package! builtin-package :pin "1a2b3c4d5e")
|
||||
|
||||
|
||||
;; Doom's packages are pinned to a specific commit and updated from release to
|
||||
;; release. The `unpin!' macro allows you to unpin single packages...
|
||||
;(unpin! pinned-package)
|
||||
;; ...or multiple packages
|
||||
;(unpin! pinned-package another-pinned-package)
|
||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||
;(unpin! t)
|
||||
|
||||
(package! avy)
|
||||
(package! org-bullets)
|
||||
(package! org-roam)
|
||||
(package! restclient)
|
||||
(package! know-your-http-well)
|
||||
(package! company-restclient)
|
||||
(package! dockerfile-mode)
|
@ -1,560 +0,0 @@
|
||||
;; General Settings
|
||||
(setq inhibit-startup-screen t)
|
||||
(setq vc-follow-symlinks t)
|
||||
(setq backup-directory-alist `((".*" . "~/.emacs.d/saves"))
|
||||
delete-old-versions t)
|
||||
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
|
||||
|
||||
(setq gc-cons-threshold 50000000)
|
||||
(setq large-file-warning-threshold 100000000)
|
||||
(global-auto-revert-mode t)
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
(prefer-coding-system 'utf-8)
|
||||
(set-default-coding-systems 'utf-8)
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
;; (define-key key-translation-map (kbd "ESC") (kbd "C-g"))
|
||||
|
||||
(add-hook 'text-mode-hook (lambda () (setq fill-column 100) (turn-on-auto-fill)))
|
||||
|
||||
(put 'narrow-to-region 'disabled nil)
|
||||
|
||||
;; (require 'server)
|
||||
;; (if (not (server-running-p)) (server-start))
|
||||
(add-hook 'prog-mode (lambda () (modify-syntax-entry ?_ "w")))
|
||||
|
||||
(setq default-directory "/home/joe")
|
||||
(setq-default display-line-numbers 'relative)
|
||||
(make-variable-buffer-local 'global-hl-line-mode)
|
||||
(set-window-margins nil 0)
|
||||
(setq-default right-fringe-width 10)
|
||||
(setq scroll-margin 0
|
||||
scroll-conservatively 100000
|
||||
scroll-preserve-screen-position 1)
|
||||
|
||||
(global-hl-line-mode +1)
|
||||
(column-number-mode +1)
|
||||
|
||||
|
||||
(dolist (mode '(dashboard-mode-hook org-mode-hook term-mode-hook eww-mode-hook vterm-mode-hook eshell-mode-hook dired-mode-hook shell-mode-hook magit-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||
|
||||
(set-face-attribute 'default nil :font "Fira Code Nerd Font" :height 105)
|
||||
|
||||
;; Visuals
|
||||
(scroll-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(menu-bar-mode -1)
|
||||
(tooltip-mode -1)
|
||||
|
||||
;; Text Settings
|
||||
(setq-default c-basic-offset 4) ;; This is annoying
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq indent-line-function 'insert-tab)
|
||||
(set-default 'truncate-lines t)
|
||||
(set-default 'truncate-partial-width-windows nil)
|
||||
|
||||
(setq-default line-spacing 5)
|
||||
(add-hook 'dashboard-mode-hook (lambda () (setq-local line-spacing 12)))
|
||||
|
||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||
|
||||
;; (setq visible-bell nil ring-bell-function 'joe/flash-mode-line)
|
||||
;; (defun joe/flash-mode-line ()
|
||||
;; (invert-face 'mode-line)
|
||||
;; (run-with-timer 0.1 nil #'invert-face 'mode-line))
|
||||
|
||||
;; (set-face-foreground 'minibuffer-prompt nil)
|
||||
|
||||
(defadvice text-scale-increase (around all-buffers (arg) activate)
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
ad-do-it)))
|
||||
|
||||
(defun joe/edit-init()
|
||||
"Edit 'init.el' quickly"
|
||||
(interactive)
|
||||
(find-file user-init-file))
|
||||
|
||||
(defun joe/show-full-path ()
|
||||
"Show the full path file name in the minibuffer."
|
||||
(interactive)
|
||||
(message (buffer-file-name)))
|
||||
|
||||
(defun joe/toggle-buffer-mode ()
|
||||
"Toggles the current major mode between actual and fundamental mode. This will act as a way to easily get
|
||||
all of the evil keybindings in buffers like magit, without compromises."
|
||||
(interactive)
|
||||
(let ((previous-mode major-mode))
|
||||
(unless (boundp 'joe/buffer-previous-mode)
|
||||
(setq-local joe/buffer-previous-mode major-mode))
|
||||
(if (equal major-mode 'fundamental-mode)
|
||||
(funcall joe/buffer-previous-mode)
|
||||
(progn
|
||||
(fundamental-mode)
|
||||
(setq-local joe/buffer-previous-mode previous-mode)))))
|
||||
|
||||
(defun joe/revert-buffer-no-confirm ()
|
||||
"Revert buffer without confirmation."
|
||||
(interactive)
|
||||
(revert-buffer :ignore-auto :noconfirm))
|
||||
|
||||
;; Packages
|
||||
(require 'package)
|
||||
(setq package-archives
|
||||
'(("org" . "http://orgmode.org/elpa/")
|
||||
("gnu" . "http://elpa.gnu.org/packages/")
|
||||
("melpa" . "https://melpa.org/packages/")))
|
||||
;; ("marmalade" . "http://marmalade-repo.org/packages/")))
|
||||
|
||||
(package-initialize)
|
||||
|
||||
;; Why we use this line
|
||||
;; https://www.reddit.com/r/emacs/comments/1rdstn/set_packageenableatstartup_to_nil_for_slightly/
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(ansi-color-faces-vector
|
||||
[default default default italic underline success warning error])
|
||||
'(custom-safe-themes
|
||||
'("aaa4c36ce00e572784d424554dcc9641c82d1155370770e231e10c649b59a074" default))
|
||||
'(flycheck-color-mode-line-face-to-color 'mode-line-buffer-id)
|
||||
'(frame-background-mode 'dark)
|
||||
'(ignored-local-variable-values
|
||||
'((eval add-hook 'after-save-hook
|
||||
'(lambda nil
|
||||
(org-babel-tangle))
|
||||
nil t)))
|
||||
'(org-agenda-files '("~/todo.org"))
|
||||
'(package-selected-packages
|
||||
'(macrostep org-kanban embark-consult embark olivetti vertico-posframe orderless vertico eglot-fsharp consult-eglot eglot nano-modeline mini-modeline pdf-tools consult all-the-icons-completion kind-icon mini-modeline shelldon pcomplete-extension corfu-doc esh-autosuggest fish-completion cape corfu highlight-quoted dirvish ranger magit multi-vterm evil-collection smartparens vterm all-the-icons org-bullets fsharp-mode fish-mode find-file-in-project helpful ahk-mode rainbow-delimiters doom-themes marginalia avy evil-commentary evil-surround undo-tree which-key dashboard))
|
||||
'(safe-local-variable-values
|
||||
'((eval add-hook 'after-save-hook
|
||||
'(lambda nil
|
||||
(org-babel-tangle))
|
||||
nil t)))
|
||||
'(window-divider-mode nil))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(magit-diff-hunk-heading-highlight ((t (:extend t :background "cornflower blue" :foreground "#212337" :weight bold)))))
|
||||
|
||||
(dolist (p package-selected-packages)
|
||||
(when (not (package-installed-p p))
|
||||
(package-install p)))
|
||||
|
||||
(setq custom-safe-themes t)
|
||||
(load-theme 'doom-vibrant t)
|
||||
;; (load-theme 'doom-flatwhite t)
|
||||
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-undo-system 'undo-tree)
|
||||
(setq evil-want-C-u-scroll t)
|
||||
(setq evil-want-Y-yank-to-eol t)
|
||||
|
||||
(require 'highlight-quoted)
|
||||
(add-hook 'emacs-lisp-mode-hook 'highlight-quoted-mode)
|
||||
|
||||
(global-undo-tree-mode)
|
||||
(setq undo-tree-visualizer-diff t)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.vanilla/undo")))
|
||||
(require 'evil)
|
||||
(evil-mode)
|
||||
(require 'evil-collection)
|
||||
(evil-collection-init)
|
||||
|
||||
(save-place-mode t)
|
||||
(setq save-place-file "~/.emacs.vanilla/places")
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
(require 'dired)
|
||||
(require 'dirvish)
|
||||
(setq delete-by-moving-to-trash t)
|
||||
(setq dired-dwim-target t)
|
||||
(setq dirvish-override-dired-mode t)
|
||||
(setq dirvish-preview-dispatchers (cl-substitute 'pdf-preface 'pdf dirvish-preview-dispatchers))
|
||||
(dirvish-define-preview exa (file)
|
||||
"Use `exa' to generate directory preview."
|
||||
:require ("exa") ; tell Dirvish to check if we have the executable
|
||||
(when (file-directory-p file) ; we only interest in directories here
|
||||
`(shell . ("exa" "--color=always" "-al" "--group-directories-first" ,file)))) ; use the command output as preview
|
||||
(setq dired-listing-switches "-l --almost-all --human-readable --time-style=long-iso --group-directories-first --no-group")
|
||||
(add-to-list 'dirvish-preview-dispatchers 'exa)
|
||||
(evil-define-key 'normal dirvish-mode-map (kbd "q") 'dirvish-quit)
|
||||
(evil-define-key 'normal 'global (kbd "-") 'dirvish)
|
||||
|
||||
(defun joe/dired-open-file ()
|
||||
"In dired, open the file named on this line."
|
||||
(interactive)
|
||||
(let* ((file (dired-get-filename nil t)))
|
||||
(call-process "xdg-open" nil 0 nil file)))
|
||||
|
||||
(defun joe/bookmark-set-and-save ()
|
||||
"Save the current buffer as a bookmark"
|
||||
(interactive)
|
||||
(bookmark-set)
|
||||
(bookmark-save))
|
||||
|
||||
(defun lsp-related-stuff ()
|
||||
(evil-define-key 'normal 'global (kbd "M-s") 'consult-imenu)
|
||||
(evil-define-key 'normal 'global (kbd "M-i") 'eldoc)
|
||||
(evil-define-key 'normal 'global (kbd "M-e") 'flymake-goto-next-error)
|
||||
(evil-define-key 'normal 'global (kbd "M-E") 'flymake-goto-prev-error))
|
||||
|
||||
(add-hook 'prog-mode-hook 'lsp-related-stuff)
|
||||
|
||||
(require 'dashboard)
|
||||
(dashboard-setup-startup-hook)
|
||||
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
|
||||
(setq dashboard-startup-banner 'logo)
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
(setq dashboard-set-heading-icons t)
|
||||
|
||||
(require 'which-key)
|
||||
(setq which-key-idle-delay 0.3)
|
||||
(which-key-mode)
|
||||
|
||||
(which-key-add-keymap-based-replacements evil-normal-state-map
|
||||
"<leader>f" '("Files")
|
||||
"<leader>b" '("Buffers")
|
||||
"<leader>d" '("Dired")
|
||||
"<leader>g" '("Git")
|
||||
"<leader>t" '("Tabs")
|
||||
"<leader>p" '("Packages")
|
||||
"<leader>s" '("Shell (vterm)")
|
||||
"<leader>h" '("Help"))
|
||||
|
||||
(evil-set-leader 'normal (kbd "SPC"))
|
||||
|
||||
;; TODO: We need 3 bindings; 1.) close buffer 2.) close window 3.) close buffer and window
|
||||
;; To disable a keybinding just bind it to nil
|
||||
(evil-define-key 'normal 'global (kbd "<leader>w") 'save-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>q") 'kill-buffer-and-window)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>h") 'help-command)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>k") 'kill-this-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>hf") 'helpful-callable)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>hv") 'helpful-variable)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>hk") 'helpful-key)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>ho") 'helpful-symbol)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>hg") 'helpful-at-point)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>fb") 'bookmark-jump)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>fr") 'consult-recent-file)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>ff") 'ffip)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>fi") 'joe/edit-init)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>bl") 'mode-line-other-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>bb") 'switch-to-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>bi") 'ibuffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>bm") 'joe/toggle-buffer-mode)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>br") 'joe/revert-buffer-no-confirm)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>bk") 'kill-this-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>gg") 'magit-status)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>gc") 'magit-clone)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>pi") 'package-install)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>pd") 'package-delete)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>pf") 'package-refresh-contents)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>pl") 'package-list-packages)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>pr") 'package-reinstall)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tt") 'multi-vterm)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tn") 'multi-vterm-next)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tv") 'vterm-other-window)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>Ba") 'joe/bookmark-set-and-save)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>Bd") 'bookmark-delete)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>cr") 'joe/compile-run)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>cc") 'joe/compile-comp)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>ct") 'consult-theme)
|
||||
|
||||
(evil-define-key 'normal 'global (kbd "C-h") 'evil-window-left)
|
||||
(evil-define-key 'normal 'global (kbd "C-j") 'evil-window-down)
|
||||
(evil-define-key 'normal 'global (kbd "C-k") 'evil-window-up)
|
||||
(evil-define-key 'normal 'global (kbd "C-l") 'evil-window-right)
|
||||
(evil-define-key 'normal 'global (kbd "M-h") 'tab-previous)
|
||||
(evil-define-key 'normal 'global (kbd "M-l") 'tab-next)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tn") 'tab-new)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tc") 'tab-close)
|
||||
;; (evil-define-key 'normal 'global (kbd "M-h") 'tab-line-switch-to-prev-tab)
|
||||
;; (evil-define-key 'normal 'global (kbd "M-l") 'tab-line-switch-to-next-tab)
|
||||
|
||||
(defvar global-evil-leader-map (make-sparse-keymap))
|
||||
(evil-define-key 'normal 'global-evil-leader-map (kbd "SPC") 'evil-send-leader)
|
||||
|
||||
(define-minor-mode global-evil-leader-mode
|
||||
"Minor mode to make evil leader global"
|
||||
:global t
|
||||
:keymap global-evil-leader-map)
|
||||
(global-evil-leader-mode)
|
||||
|
||||
;; (require 'mini-modeline)
|
||||
;; (mini-modeline-mode 1)
|
||||
(require 'nano-modeline)
|
||||
(nano-modeline-mode 1)
|
||||
|
||||
(require 'evil-surround)
|
||||
(global-evil-surround-mode 1)
|
||||
|
||||
(require 'evil-snipe)
|
||||
(evil-snipe-override-mode 1)
|
||||
|
||||
(require 'evil-commentary)
|
||||
(evil-commentary-mode)
|
||||
|
||||
(require 'avy)
|
||||
(setq avy-keys '(?a ?s ?d ?f ?w ?e ?r ?u ?i ?o ?h ?j ?k ?l ?x ?c ?m))
|
||||
(setq avy-all-windows t)
|
||||
(setq avy-background t)
|
||||
(defvar avy-map (make-sparse-keymap))
|
||||
|
||||
(define-key evil-normal-state-map (kbd ",") avy-map)
|
||||
(define-key avy-map "b" #'avy-goto-word-0-above)
|
||||
(define-key avy-map "w" #'avy-goto-word-0-below)
|
||||
(define-key avy-map "c" #'avy-goto-char-timer)
|
||||
|
||||
(require 'org-bullets)
|
||||
(defun joe/org-mode-setup ()
|
||||
(org-bullets-mode)
|
||||
(org-indent-mode))
|
||||
(add-hook 'org-mode-hook 'joe/org-mode-setup)
|
||||
(setq org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "|" "DONE" "BACKLOG")))
|
||||
(require 'org-tempo)
|
||||
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
|
||||
(setq org-edit-src-content-indentation 0)
|
||||
|
||||
(require 'olivetti)
|
||||
(setq olivetti-minimum-body-width 120)
|
||||
|
||||
;; VEMCO
|
||||
|
||||
(require 'vertico)
|
||||
(vertico-mode)
|
||||
(vertico-multiform-mode)
|
||||
(define-key vertico-map "\M-G" #'vertico-multiform-mode)
|
||||
(require 'vertico-posframe)
|
||||
(setq vertico-posframe-min-width 150)
|
||||
(setq vertico-posframe-min-height 30)
|
||||
(vertico-posframe-mode)
|
||||
(require 'embark)
|
||||
(require 'embark-consult)
|
||||
(define-key vertico-map "\M-e" #'embark-act)
|
||||
|
||||
(require 'marginalia)
|
||||
(marginalia-mode t)
|
||||
(setq marginalia-annotators
|
||||
'(marginalia-annotators-heavy marginalia-annotators-light nil))
|
||||
(require 'orderless)
|
||||
(setq completion-styles '(orderless basic)
|
||||
completion-category-overrides '((file (styles basic partial-completion))))
|
||||
(require 'savehist)
|
||||
(savehist-mode)
|
||||
|
||||
(require 'recentf)
|
||||
(setq recentf-max-saved-items 1000)
|
||||
(setq recentf-max-menu-items 500)
|
||||
(recentf-mode t)
|
||||
(run-at-time t (* 5 60) 'recentf-save-list)
|
||||
|
||||
(defun recentf-push-buffers-in-frame ()
|
||||
(walk-windows
|
||||
(lambda (win)
|
||||
(let ((bfn (buffer-local-value 'buffer-file-name (window-buffer win))))
|
||||
(and bfn (recentf-add-file bfn))))))
|
||||
(add-to-list 'window-configuration-change-hook 'recentf-push-buffers-in-frame)
|
||||
|
||||
(defun recentf-add-dired-directory ()
|
||||
(when (and (stringp dired-directory)
|
||||
(equal "" (file-name-nondirectory dired-directory)))
|
||||
(recentf-add-file dired-directory)))
|
||||
(add-hook 'dired-mode-hook 'recentf-add-dired-directory)
|
||||
|
||||
;; Magic advice to rename entries in recentf when moving files in
|
||||
;; dired.
|
||||
(defun rjs/recentf-rename-notify (oldname newname &rest args)
|
||||
(if (file-directory-p newname)
|
||||
(rjs/recentf-rename-directory oldname newname)
|
||||
(rjs/recentf-rename-file oldname newname)))
|
||||
|
||||
(defun rjs/recentf-rename-file (oldname newname)
|
||||
(setq recentf-list
|
||||
(mapcar (lambda (name)
|
||||
(if (string-equal name oldname)
|
||||
newname
|
||||
name))
|
||||
recentf-list)))
|
||||
|
||||
(defun rjs/recentf-rename-directory (oldname newname)
|
||||
;; oldname, newname and all entries of recentf-list should already
|
||||
;; be absolute and normalised so I think this can just test whether
|
||||
;; oldname is a prefix of the element.
|
||||
(setq recentf-list
|
||||
(mapcar (lambda (name)
|
||||
(if (string-prefix-p oldname name)
|
||||
(concat newname (substring name (length oldname)))
|
||||
name))
|
||||
recentf-list)))
|
||||
|
||||
;; (advice-add 'dired-rename-file :after #'rjs/recentf-rename-notify)
|
||||
|
||||
(require 'smartparens)
|
||||
(smartparens-global-mode +1)
|
||||
(show-paren-mode +1)
|
||||
(sp-pair "'" nil :actions :rem)
|
||||
|
||||
(require 'vterm)
|
||||
(setq vterm-shell "/bin/fish")
|
||||
(setq vterm-timer-delay 0.01)
|
||||
(setq vterm-buffer-name-string "VTerm - %s")
|
||||
(setq vterm-max-scrollback 100000)
|
||||
|
||||
(add-hook 'vterm-mode-hook
|
||||
(lambda () (setq global-hl-line-mode nil))
|
||||
(evil-define-key 'normal vterm-mode-map (kbd "(") 'vterm-previous-prompt)
|
||||
(evil-define-key 'normal vterm-mode-map (kbd ")") 'vterm-next-prompt))
|
||||
|
||||
(require 'find-file-in-project)
|
||||
(setq ffip-use-rust-fd 't)
|
||||
|
||||
(require 'evil-goggles)
|
||||
(evil-goggles-mode)
|
||||
(setq evil-goggles-duration 0.075)
|
||||
(setq evil-goggles-pulse t)
|
||||
(setq evil-goggles-async-duration 0.55)
|
||||
|
||||
(modify-all-frames-parameters
|
||||
'((right-divider-width . 5)
|
||||
(internal-border-width . 10)))
|
||||
;; (dolist (face '(window-divider
|
||||
;; window-divider-first-pixel
|
||||
;; window-divider-last-pixel))
|
||||
;; (face-spec-reset-face face)
|
||||
;; (set-face-foreground face "#333"))
|
||||
;; (set-face-background 'fringe (face-attribute 'default :background))
|
||||
|
||||
(require 'corfu)
|
||||
(global-corfu-mode)
|
||||
(setq corfu-auto t)
|
||||
(setq corfu-scroll-margin 10)
|
||||
(setq corfu-preselect-first nil)
|
||||
(setq corfu-preview-current t)
|
||||
(setq corfu-echo-documentation t)
|
||||
(setq corfu-quit-no-match t)
|
||||
(setq corfu-auto-prefix 1)
|
||||
(setq corfu-auto-delay 0)
|
||||
(setq corfu-max-width 100
|
||||
corfu-min-width 50)
|
||||
(require 'kind-icon)
|
||||
(setq kind-icon-default-face 'corfu-default)
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)
|
||||
|
||||
(require 'all-the-icons-completion)
|
||||
(all-the-icons-completion-mode)
|
||||
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup)
|
||||
|
||||
(require 'ligature)
|
||||
(global-ligature-mode)
|
||||
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
|
||||
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
|
||||
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
|
||||
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
|
||||
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
|
||||
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
|
||||
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
|
||||
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
|
||||
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
|
||||
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
|
||||
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
|
||||
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
|
||||
"\\\\" "://"))
|
||||
|
||||
(add-to-list 'completion-at-point-functions #'cape-file)
|
||||
|
||||
(define-key corfu-map (kbd "M-d") #'corfu-doc-toggle)
|
||||
(define-key corfu-map (kbd "M-p") #'corfu-doc-scroll-down)
|
||||
(define-key corfu-map (kbd "M-n") #'corfu-doc-scroll-up)
|
||||
|
||||
(require 'lsp)
|
||||
(require 'consult)
|
||||
;; (require 'consult-lsp)
|
||||
;; (require 'dap-mode)
|
||||
;; (require 'dap-netcore)
|
||||
;; (require 'dap-gdb-lldb)
|
||||
;; (setq dap-print-io t)
|
||||
|
||||
(require 'eglot)
|
||||
(require 'eglot-fsharp)
|
||||
(require 'consult-eglot)
|
||||
|
||||
(defun joe/compile-run () (interactive) (compile "make run"))
|
||||
(defun joe/compile-comp () (interactive) (compile "make"))
|
||||
|
||||
;; (require 'tree-sitter)
|
||||
;; (require 'tree-sitter-langs)
|
||||
;; (require 'evil-textobj-tree-sitter)
|
||||
;; (define-key evil-outer-text-objects-map "f" (evil-textobj-tree-sitter-get-textobj "function.outer"))
|
||||
;; (define-key evil-inner-text-objects-map "f" (evil-textobj-tree-sitter-get-textobj "function.inner"))
|
||||
;; (define-key evil-normal-state-map (kbd "]f") (lambda ()
|
||||
;; (interactive)
|
||||
;; (evil-textobj-tree-sitter-goto-textobj "function.outer")))
|
||||
;; (define-key evil-normal-state-map (kbd "[f") (lambda ()
|
||||
;; (interactive)
|
||||
;; (evil-textobj-tree-sitter-goto-textobj "function.outer" t)))
|
||||
|
||||
(setq display-buffer-alist
|
||||
`((,(rx bos
|
||||
(| (literal "*compilation")
|
||||
(literal "*shell")
|
||||
(literal "*eshell")
|
||||
(literal "*Compile-Log")))
|
||||
display-buffer-in-direction
|
||||
(window . ;reference window
|
||||
t) ;either `t' (selected window), `main', `root', or an arbitrary valid window
|
||||
(direction .
|
||||
below) ;`below' (window) or `bottom' (of frame)
|
||||
;absolute (10) or relative (0.3)
|
||||
(window-height . 0.33))))
|
||||
|
||||
;; (dap-register-debug-template "NetCoreDdg Launch (4)"
|
||||
;; (list :type "coreclr"
|
||||
;; :request "launch"
|
||||
;; :mode "launch"
|
||||
;; :name "NetCoreDbg Launch"
|
||||
;; :cwd nil
|
||||
;; :dap-compilation "dotnet build"
|
||||
;; :program "${workspaceFolder}/bin/Debug/net6.0/${workspaceFolderBasename}"))
|
||||
;; (dap-register-debug-provider
|
||||
;; "coreclr"
|
||||
;; 'dap-netcore--populate-args)
|
||||
;; (add-to-list 'load-path (expand-file-name "~/.emacs.vanilla/elpa/aweshell/"))
|
||||
;; (require 'aweshell)
|
||||
;; (require 'fish-completion)
|
||||
;; (global-fish-completion-mode)
|
||||
;; (setq evil-collection-company-use-tng nil)
|
||||
|
||||
;; (require 'slime)
|
||||
;; (setq inferior-lisp-program "/usr/bin/sbcl")
|
||||
|
||||
;; (add-hook 'slime-mode-hook
|
||||
;; (lambda ()
|
||||
;; ;; (setq global-hl-line-mode nil)
|
||||
;; (evil-define-key 'normal slime-repl-mode-map (kbd "(") 'slime-repl-previous-prompt)
|
||||
;; (evil-define-key 'normal slime-repl-mode-map (kbd ")") 'slime-repl-next-prompt)
|
||||
;; (evil-define-key 'normal slime-repl-mode-map (kbd "C-j") 'evil-window-down)
|
||||
;; (evil-define-key 'normal slime-repl-mode-map (kbd "C-k") 'evil-window-up)))
|
||||
;; (setq slime-contribs '(slime-fancy slime-company))
|
||||
|
||||
;; (require 'eglot)
|
||||
;; (require 'eglot-fsharp)
|
||||
;; (require 'consult-eglot)
|
||||
|
||||
;; TODO: Packages to check out
|
||||
;; expand-region
|
||||
;; projectile
|
||||
;; Hydra (we can use it for some of the ideas I've had about repeating and arranging stuff)
|
||||
;; CTRLF (figure out if it does anything interesting)
|
||||
;; exec-path-from-shell
|
||||
;; markdown-preview-mode
|
||||
;; markdown-mode
|
551
.vimrc
Normal file
551
.vimrc
Normal file
@ -0,0 +1,551 @@
|
||||
if &shell =~# 'fish$'
|
||||
set shell=bash
|
||||
endif
|
||||
set nocompatible
|
||||
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
||||
filetype off
|
||||
call neobundle#begin(expand('~/.vim/bundle/'))
|
||||
|
||||
" Utilities
|
||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
||||
NeoBundle 'tpope/vim-dispatch'
|
||||
NeoBundle 'Shougo/vimproc.vim'
|
||||
NeoBundle 'Shougo/neocomplete'
|
||||
NeoBundle 'Shougo/neosnippet'
|
||||
NeoBundle 'Shougo/neosnippet-snippets'
|
||||
NeoBundle 'scrooloose/nerdtree'
|
||||
NeoBundle 'scrooloose/syntastic'
|
||||
NeoBundle 'mhinz/vim-startify'
|
||||
NeoBundle 'junegunn/vim-easy-align'
|
||||
NeoBundle 'kien/ctrlp.vim'
|
||||
NeoBundle 'sgur/ctrlp-extensions.vim'
|
||||
NeoBundle 'Lokaltog/vim-easymotion'
|
||||
NeoBundle 'jrhorn424/vim-multiple-cursors'
|
||||
NeoBundle 'rking/ag.vim'
|
||||
NeoBundle 'sjl/gundo.vim'
|
||||
NeoBundle 'tpope/vim-fugitive'
|
||||
|
||||
" Enhancements
|
||||
NeoBundle 'tpope/vim-surround'
|
||||
NeoBundle 'tpope/vim-repeat'
|
||||
NeoBundle 'tpope/vim-commentary'
|
||||
NeoBundle 'tpope/vim-eunuch'
|
||||
NeoBundle 'dhruvasagar/vim-vinegar'
|
||||
NeoBundle 'terryma/vim-smooth-scroll'
|
||||
NeoBundle 'Raimondi/delimitMate'
|
||||
NeoBundle 'bling/vim-airline'
|
||||
NeoBundle 'bkad/CamelCaseMotion'
|
||||
NeoBundle 'vim-scripts/Parameter-Text-Objects'
|
||||
NeoBundle 'osyo-manga/vim-over'
|
||||
NeoBundle 'tmhedberg/matchit'
|
||||
NeoBundle 'matze/vim-move'
|
||||
NeoBundle 'xolox/vim-misc'
|
||||
NeoBundle 'xolox/vim-colorscheme-switcher'
|
||||
NeoBundle 'haya14busa/incsearch.vim'
|
||||
NeoBundle 'rhysd/clever-f.vim'
|
||||
NeoBundle 'christoomey/vim-tmux-navigator'
|
||||
|
||||
" Language
|
||||
NeoBundle 'Rip-Rip/clang_complete'
|
||||
NeoBundle 'dag/vim-fish'
|
||||
NeoBundle 'marijnh/tern_for_vim'
|
||||
NeoBundle 'jelera/vim-javascript-syntax'
|
||||
NeoBundle 'hail2u/vim-css3-syntax'
|
||||
NeoBundle 'groenewege/vim-less'
|
||||
NeoBundle 'othree/javascript-libraries-syntax.vim'
|
||||
NeoBundle 'OmniSharp/omnisharp-vim'
|
||||
NeoBundle 'xolox/vim-lua-ftplugin'
|
||||
NeoBundle 'tclem/vim-arduino'
|
||||
" NeoBundle 'jplaut/vim-arduino-ino/'
|
||||
|
||||
" Web
|
||||
NeoBundle 'mattn/emmet-vim'
|
||||
NeoBundle 'ap/vim-css-color'
|
||||
NeoBundle 'KabbAmine/vCoolor.vim'
|
||||
NeoBundle 'Valloric/MatchTagAlways'
|
||||
NeoBundle 'vim-scripts/closetag.vim'
|
||||
NeoBundle 'jaxbot/browserlink.vim'
|
||||
|
||||
call neobundle#end()
|
||||
|
||||
filetype plugin indent on
|
||||
set history=2000
|
||||
set ruler
|
||||
set laststatus=2
|
||||
set formatoptions=t
|
||||
set relativenumber
|
||||
set noshowmatch
|
||||
set splitbelow
|
||||
set splitright
|
||||
set hidden
|
||||
set wildmenu
|
||||
set wildmode=longest,full
|
||||
set backspace=eol,start,indent
|
||||
set novisualbell
|
||||
set noerrorbells
|
||||
let loaded_matchparen=0
|
||||
set clipboard=unnamed
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set sessionoptions-=
|
||||
set sessionoptions-=buffers
|
||||
set sessionoptions-=blank
|
||||
set guioptions-=r
|
||||
set guioptions-=L
|
||||
set guioptions-=e
|
||||
set mouse=a
|
||||
set foldmethod=syntax
|
||||
set foldcolumn=1
|
||||
set nrformats+=alpha
|
||||
set nowrap
|
||||
|
||||
let mapleader = "\<Space>"
|
||||
" Macros
|
||||
" To List
|
||||
noremap <Leader>mtl f[xxbi<<Esc>ea><Esc>bbiList<Esc>b
|
||||
" To Array
|
||||
noremap <Leader>mta f>Bdiwxf>xi[]<Esc>B
|
||||
" Replace Word
|
||||
nnoremap <Leader>rw :%s/\<<C-r><C-w>\>/
|
||||
" Clean up Interface
|
||||
nnoremap <Leader>mi ddJO<Esc>4jdd2kcc
|
||||
" Extract Definition
|
||||
nnoremap <Leader>med "vyiwmv^/\u<CR>:nohlsearch<CR>y`v"ty`vo<C-r>v = new <C-r>t<C-h>();<Esc>^v$hdV"ldk`v
|
||||
" Delete Outer Function
|
||||
nnoremap <Leader>mdaf viBdVkpmtgv<}dd`t
|
||||
" Delete Surrounding Function
|
||||
vnoremap <Leader>mdif "tdxXvBd<C-r>t
|
||||
" Add Constructor
|
||||
nnoremap <Leader>mac "tyiwjopublic <C-r>t() {}<Esc>i<CR><Esc>O//<Esc>
|
||||
" Create Yield from IEnumerator
|
||||
nnoremap <Leader>mye "tyiwmtowhile (<C-r>t.MoveNext()) yield return <C-r>t.Current;<Esc>`t
|
||||
" Create Yield from Task
|
||||
nnoremap <Leader>myt "tyiwmtowhile (!<C-r>t.IsCompleted) yield return null;<Esc>`t
|
||||
" Add Curly Braces to inline if
|
||||
nnoremap <Leader>mif ^f(%ls {<Esc>li<CR><Esc>o}<Esc>kw
|
||||
" Surround with if statement
|
||||
vnoremap <Leader>mif dOif () {}<Esc>i<CR><CR><Esc>kVp=iBk^f(a
|
||||
" Add ContextMenu to Function
|
||||
nnoremap <Leader>mcm ^f(hyiwO[ContextMenu("<C-R>"")]<Esc>j^f(b
|
||||
" Add this.varName = varName;
|
||||
nnoremap <Leader>mthis mmyiwothis.<C-r>* = <C-r>*;<Esc>`m
|
||||
" Extra Line
|
||||
" alt + o
|
||||
noremap <Space> <nop>
|
||||
noremap <Leader>/ :nohlsearch<CR>
|
||||
nnoremap D d$
|
||||
nnoremap Y y$
|
||||
nnoremap vv ^v$h
|
||||
noremap \ q
|
||||
nnoremap <Leader>vim :tabe $MYVIMRC<CR>
|
||||
noremap <Leader>sr :w<CR>:so %<CR>
|
||||
nnoremap ' `
|
||||
nnoremap ` '
|
||||
noremap $ g_
|
||||
nnoremap <C-s> :w<CR>
|
||||
noremap <Leader>= mt=i}`t
|
||||
" Buffers
|
||||
nnoremap <Leader>q :bw<CR>
|
||||
nnoremap <Leader>bb :b#<CR>
|
||||
nnoremap <Leader>bd :b#<CR>:bd#<CR>
|
||||
" Windows
|
||||
nnoremap <Leader>wq :windo bw<CR>
|
||||
noremap <Right> <C-w>10<
|
||||
noremap <Left> <C-w>10>
|
||||
noremap <Up> <C-w>4+
|
||||
noremap <Down> <C-w>4-
|
||||
" MacVim has different alt codes so gotta check if gui_running, there are the codes in order
|
||||
" alt + ;
|
||||
" alt + o & alt + O
|
||||
" alt + h & alt + l
|
||||
" if has("gui_running")
|
||||
" inoremap » <Esc>A;
|
||||
" nnoremap » A;<Esc>
|
||||
" nnoremap ï o<Esc>k
|
||||
" nnoremap Ï O<Esc>j
|
||||
" noremap è gT
|
||||
" noremap ì gt
|
||||
" noremap <silent> È :tabmove -1<CR>
|
||||
" nnoremap <silent> Ì :tabmove +1<CR>
|
||||
" else
|
||||
inoremap … <Esc>A;
|
||||
nnoremap … A;<Esc>;
|
||||
nnoremap ø o<Esc>k
|
||||
nnoremap Ø O<Esc>j
|
||||
noremap ˙ gT
|
||||
noremap ¬ gt
|
||||
noremap <silent> Ó :tabmove -1<CR>
|
||||
nnoremap <silent> Ò :tabmove +1<CR>
|
||||
" Map vim-move in terminal
|
||||
vmap ∆ <Plug>MoveBlockDown
|
||||
vmap ˚ <Plug>MoveBlockUp
|
||||
nmap ∆ <Plug>MoveLineDown
|
||||
nmap ˚ <Plug>MoveLineUp
|
||||
" endif
|
||||
|
||||
" open Help in vertical window
|
||||
if (!exists(":H"))
|
||||
command -nargs=* -complete=help H vertical belowright help <args>
|
||||
endif
|
||||
|
||||
augroup insert_mode_stuff
|
||||
autocmd!
|
||||
au InsertEnter * set cursorline
|
||||
au InsertLeave * set nocursorline
|
||||
autocmd BufNewFile,BufRead * setlocal formatoptions=t
|
||||
autocmd BufNewFile,BufRead * set colorcolumn=80
|
||||
augroup END
|
||||
|
||||
command! CDC cd %:p:h
|
||||
|
||||
" Show syntax definition where cursor is placed
|
||||
func! SynStack()
|
||||
if !exists("*synstack")
|
||||
return
|
||||
endif
|
||||
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
|
||||
endfunc
|
||||
nnoremap <Leader>syn :call SynStack()<CR>
|
||||
|
||||
" Toggle booleans
|
||||
func! ToggleBool()
|
||||
let l:word = expand("<cword>")
|
||||
if l:word ==? "true"
|
||||
let l:word = "false"
|
||||
elseif l:word ==? "false"
|
||||
let l:word = "true"
|
||||
elseif l:word ==? "public"
|
||||
let l:word = "protected"
|
||||
elseif l:word ==? "protected"
|
||||
let l:word = "private"
|
||||
elseif l:word ==? "private"
|
||||
let l:word = "public"
|
||||
else
|
||||
return "\<c-x>"
|
||||
endif
|
||||
return "ciw" . l:word . "\<Esc>"
|
||||
endfunc
|
||||
nnoremap <expr> <c-x> ToggleBool()
|
||||
command! Retab set ts=2 noet | retab! | set et ts=4 | retab
|
||||
|
||||
command! DeleteBadWhiteSpace %s/\s\+$//e | %s/^\s\+$//e | %s/\r//e
|
||||
command! Reformat %s/\(\<if\|for\|foreach\|while\|do\>\)(/\1 (/e | g/) {\$/normal $i<CR><Esc>/e
|
||||
|
||||
" Searching
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set hlsearch
|
||||
nohlsearch
|
||||
|
||||
" Appearance
|
||||
syntax on
|
||||
set number
|
||||
set t_Co=256
|
||||
set linespace=2
|
||||
if has("gui_running")
|
||||
set guifont=Andale\ Mono:h12
|
||||
colorscheme jellybeans
|
||||
" colorscheme autumnleaf
|
||||
else
|
||||
" colorscheme solarized
|
||||
colorscheme jellybeans
|
||||
" Solarized
|
||||
" set background=dark
|
||||
endif
|
||||
|
||||
func! SetFont(size)
|
||||
exec 'set guifont=Andale\ Mono:h' . a:size
|
||||
endfun
|
||||
command! -nargs=1 FontSize :call SetFont(<f-args>)
|
||||
|
||||
" DelimitMate
|
||||
let g:delimitMate_expand_cr=1
|
||||
let g:delitMate_expand_space=0
|
||||
|
||||
" CameCase Text Object
|
||||
map <silent> q <Plug>CamelCaseMotion_w
|
||||
map <silent> Q <Plug>CamelCaseMotion_b
|
||||
omap <silent> iq <Plug>CamelCaseMotion_iw
|
||||
xmap <silent> iq <Plug>CamelCaseMotion_iw
|
||||
|
||||
" Parameter Text Object
|
||||
let g:no_parameter_object_maps = 1
|
||||
vmap <silent> ia <Plug>ParameterObjectI
|
||||
omap <silent> ia <Plug>ParameterObjectI
|
||||
vmap <silent> aa <Plug>ParameterObjectA
|
||||
omap <silent> aa <Plug>ParameterObjectA
|
||||
|
||||
" Easy Motion
|
||||
let g:EasyMotion_do_mapping=0
|
||||
let g:EasyMotion_keys = 'asdfjkleirwuo'
|
||||
nmap , <Plug>(easymotion-prefix)
|
||||
nmap S <Plug>(easymotion-sl2)
|
||||
nmap ,f <Plug>(easymotion-f)
|
||||
nmap ,F <Plug>(easymotion-F)
|
||||
nmap ,t <Plug>(easymotion-t)
|
||||
nmap ,T <Plug>(easymotion-T)
|
||||
nmap ,w <Plug>(easymotion-w)
|
||||
nmap ,W <Plug>(easymotion-W)
|
||||
nmap ,b <Plug>(easymotion-b)
|
||||
nmap ,B <Plug>(easymotion-B)
|
||||
nmap ,e <Plug>(easymotion-e)
|
||||
nmap ,E <Plug>(easymotion-E)
|
||||
nmap ,ge <Plug>(easymotion-ge)
|
||||
nmap ,gE <Plug>(easymotion-gE)
|
||||
nmap ,j <Plug>(easymotion-j)
|
||||
nmap ,k <Plug>(easymotion-k)
|
||||
vmap ,j <Plug>(easymotion-j)
|
||||
vmap ,k <Plug>(easymotion-k)
|
||||
nmap ,n <Plug>(easymotion-n)
|
||||
nmap ,N <Plug>(easymotion-N)
|
||||
nmap ,s <Plug>(easymotion-s2)
|
||||
nmap ,/ <Plug>(easymotion-sn)
|
||||
|
||||
" Clever-F
|
||||
let g:clever_f_across_no_line=1
|
||||
|
||||
" Incsearch.vim
|
||||
map / <Plug>(incsearch-forward)
|
||||
map ? <Plug>(incsearch-backward)
|
||||
map g/ <Plug>(incsearch-stay)
|
||||
let g:incsearch#consistent_n_direction = 1
|
||||
let g:incsearch#emacs_like_keymap = 1
|
||||
|
||||
" Javascript Libraries
|
||||
let g:used_javascript_libs = 'jquery,angularjs,angularui,sugar'
|
||||
|
||||
" Gundo
|
||||
noremap <Leader>g :GundoToggle<CR>
|
||||
|
||||
" Easy Align
|
||||
vmap <Enter> <Plug>(EasyAlign)
|
||||
nmap <Leader>e <Plug>(EasyAlign)
|
||||
|
||||
" Go to URLs
|
||||
vnoremap <leader>du "uy:silent !open http://docs.unity3d.com/Documentation/ScriptReference/<C-r>u.html<CR>
|
||||
nnoremap <leader>dg :call GoToUrl("google")<CR>
|
||||
nnoremap <leader>du :call GoToUrl("unity")<CR>
|
||||
nnoremap <leader>dm :call GoToUrl("msdn")<CR>
|
||||
fun! GoToUrl(options)
|
||||
let keyword = expand("<cword>")
|
||||
if (a:options == "google")
|
||||
let url = "http://www.google.com/search?q="
|
||||
elseif (a:options == "unity")
|
||||
let url = "http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q="
|
||||
elseif (a:options == "msdn")
|
||||
let url = "http://social.msdn.microsoft.com/Search/en-US?query="
|
||||
endif
|
||||
|
||||
exec '!open ' . url . keyword
|
||||
endfun
|
||||
|
||||
" Scrolling Speed
|
||||
noremap <silent> <c-u> :call smooth_scroll#up(&scroll, 10, 3)<CR>
|
||||
noremap <silent> <c-d> :call smooth_scroll#down(&scroll, 10, 3)<CR>
|
||||
noremap <silent> <c-b> :call smooth_scroll#up(&scroll*2, 10, 4)<CR>
|
||||
noremap <silent> <c-f> :call smooth_scroll#down(&scroll*2, 10, 4)<CR>
|
||||
noremap <silent> <c-y> :call smooth_scroll#up(&scroll/5, 15, 1)<CR>
|
||||
noremap <silent> <c-e> :call smooth_scroll#down(&scroll/5, 15, 1)<CR>
|
||||
|
||||
" Startify
|
||||
let g:startify_session_dir = "~/.vim/sessions/"
|
||||
let g:startify_list_order = [ ['SESSIONS'], 'sessions', ['FILES'], 'files', ['BOOKMARKS'], 'bookmarks', ]
|
||||
let g:startify_bookmarks = ["~/.vim/", "ftp://ftp.ferano.io//", "~/Documents/Work/", "~/Documents/Work/jflib/Assets/jflib/", "~/Documents/Work/jamtok/project/Assets/", "~/Documents/Work/poptok/Assets/Scripts"]
|
||||
let g:startify_files_number = 7
|
||||
let g:startify_session_persistence = 1
|
||||
let g:startify_enable_special = 0
|
||||
" Load custom header
|
||||
:source ~/.vim/startify_header.vim
|
||||
|
||||
" NERDTree
|
||||
let NERDTreeIgnore=['.meta$[[file]]']
|
||||
|
||||
" Emmet
|
||||
let g:user_emmet_leader_key='<C-Z>'
|
||||
let g:user_emmet_install_global = 0
|
||||
augroup emmet_stuff
|
||||
autocmd FileType html,css EmmetInstall
|
||||
augroup END
|
||||
|
||||
" MatchTagAlways
|
||||
highlight MatchParen ctermfg=black ctermbg=lightgreen guifg=#002b36 guibg=#b58900
|
||||
|
||||
" Ag.vim
|
||||
let g:agformat="%f:%l:%m"
|
||||
noremap <Leader>a :Ag!<space>
|
||||
let g:agprg="ag --column --smart-case"
|
||||
|
||||
" C Stuff
|
||||
" augroup c_bindings
|
||||
" autocmd!
|
||||
" au FileType c noremap <silent><buffer> ) ?{<CR>w99[{:nohlsearch<CR>
|
||||
" au FileType c noremap <silent><buffer> ( j0?{<CR>w99[{%/{<CR>:nohlsearch<CR>
|
||||
" augroup END
|
||||
|
||||
" Arduino
|
||||
augroup arduino_files
|
||||
autocmd!
|
||||
au BufRead,BufNewFile *.pde set filetype=arduino
|
||||
au BufRead,BufNewFile *.ino set filetype=arduino
|
||||
augroup END
|
||||
" let g:vim_arduino_library_path = "/Applications/Arduino.app"
|
||||
" let g:vim_arduino_serial_port = "/dev/tty.usbmodem1d1131"
|
||||
|
||||
" Lua Stuff
|
||||
let g:lua_check_syntax = 0
|
||||
let g:lua_complete_omni = 1
|
||||
|
||||
" Compile and run current C file
|
||||
nnoremap <Leader>cc :!gcc -Wall -o %:r %<CR>
|
||||
nnoremap <Leader>cr :!gcc -Wall -o %:r % && ./%:r<CR>
|
||||
|
||||
let g:clang_library_path="/Users/josephferano/src/clang+llvm-3.3-x86_64-apple-darwin12/lib/libclang.dylib"
|
||||
|
||||
" CtrlP
|
||||
set wildignore+=*/tmp/*,*/Temp/*,*/Library/*,*/Builds/*,*.png,*.jpg,*.asset,*.unity,*.csproj,*.gif,*.so,*.swp,*.zip,*.meta,*.ttc,*.userprefs,*.mat,*.mp3,*.ogg,*.wav,*.bmp,*.anim,*.TTF,tags
|
||||
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](obj|bin|node_modules|bower_components)|(\.(swp|ico|git|svn))$', 'file': '\v\.(exe|so|dll|meta|prefab|unity3d|sln)$', 'link': 'some_bad_symbolic_links', }
|
||||
let g:ctrlp_map = '<c-p>p'
|
||||
noremap <C-p><C-p> :CtrlP<CR>
|
||||
noremap <C-p>m :CtrlPMRU<CR>
|
||||
noremap <C-p>b :CtrlPBuffer<CR>
|
||||
noremap <C-p>t :CtrlPBufTag<CR>
|
||||
noremap <C-p>l :CtrlPLine<CR>
|
||||
noremap <C-p>y :CtrlPYankring<CR>
|
||||
noremap <C-p>c :CtrlPCmdline <CR>
|
||||
let g:ctrlp_match_window="ttb,min:1,max:15,results:15"
|
||||
let g:ctrlp_session_dir=".vim/sessions/"
|
||||
let g:ctrlp_by_filename = 1
|
||||
let g:ctrlp_working_path_mode = ''
|
||||
let g:ctrlp_buffer_func = { 'enter': 'CtrlpMaps' }
|
||||
|
||||
func! CtrlpMaps()
|
||||
nnoremap <buffer> <silent> <c-@> :call <sid>DeleteBuffer()<cr>
|
||||
" nnoremap <buffer> <silent> <c-q> :call <sid>QuickLook()<cr>
|
||||
endfunc
|
||||
|
||||
func! s:QuickLook()
|
||||
let line = getline('.')
|
||||
let l:path = getcwd() . substitute(line, '> ', '/', "")
|
||||
call system("qlmanage -p 2>/dev/null '" . path . "'")
|
||||
endfunc
|
||||
|
||||
func! s:DeleteBuffer()
|
||||
let line = getline('.')
|
||||
let bufid = line =~ '\[\d\+\*No Name\]$' ? str2nr(matchstr(line, '\d\+'))
|
||||
\ : fnamemodify(line[2:], ':p')
|
||||
exec "bd" bufid
|
||||
exec "norm \<F5>"
|
||||
endfunc
|
||||
|
||||
" Syntastic
|
||||
let g:syntastic_cs_checkers = ['syntax']
|
||||
|
||||
" OmniSharp
|
||||
augroup omnisharp_complete
|
||||
autocmd!
|
||||
autocmd FileType cs set commentstring=//\ %s
|
||||
autocmd FileType cs setlocal omnifunc=OmniSharp#Complete
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>og :OmniSharpGotoDefinition<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>ofi :OmniSharpFindImplementations<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>ofu :OmniSharpFindUsages<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>odc :OmniSharpDocumentation<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>oft :OmniSharpFindType<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>ofs :OmniSharpFindSymbol<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>ofm :OmniSharpFindMembers<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>oht :OmniSharpHighlightTypes<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>orl :OmniSharpReloadSolution<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>oso :OmniSharpStopServer<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>osa :OmniSharpStartServer<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>oad :OmniSharpAddToProject<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>ob :OmniSharpBuildAsync<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>orn :OmniSharpRenameTo<space><C-r><C-w><C-f>h
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>oca :OmniSharpGetCodeActions<cr>
|
||||
autocmd FileType cs vnoremap <buffer> <Leader>oca :call OmniSharp#GetCodeActions('visual')<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>f :OmniSharpTypeLookup<cr>
|
||||
autocmd FileType cs nnoremap <buffer> <Leader>F mmF(h:OmniSharpTypeLookup<cr>`m
|
||||
autocmd FileType cs nnoremap <silent> <buffer> ( :OmniSharpNavigateDown<cr>
|
||||
autocmd FileType cs nnoremap <silent> <buffer> ) :OmniSharpNavigateUp<cr>
|
||||
augroup END
|
||||
|
||||
set completeopt=longest,menuone
|
||||
let g:OmniSharp_typeLookupInPreview = 0
|
||||
let g:OmniSharp_timeout = 100
|
||||
if has("gui_running")
|
||||
hi link csAttributeType Constant
|
||||
hi link csUnspecifiedStatement Constant
|
||||
hi link csInterfaceDeclaration Repeat
|
||||
else
|
||||
hi link csAttributeType Special
|
||||
hi link csUnspecifiedStatement PreProc
|
||||
hi link csInterfaceDeclaration StorageClass
|
||||
hi link csModifier Identifier
|
||||
hi link csClass Constant
|
||||
hi link csType Constant
|
||||
hi link CSharpUserType Identifier
|
||||
endif
|
||||
" source ~/Documents/Work/vim-csharp-repl/plugin/csharp-repl.vim
|
||||
|
||||
" NeoComplete
|
||||
let g:acp_enableAtStartup = 0
|
||||
let g:neocomplete#enable_at_startup = 1
|
||||
let g:neocomplete#enable_smart_case = 1
|
||||
let g:neocomplete#sources#syntax#min_keyword_length = 2
|
||||
let g:neocomplete#max_list = 25
|
||||
let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
|
||||
let g:neocomplete#sources#dictionary#dictionaries = {
|
||||
\ 'default' : '',
|
||||
\ 'vimshell' : $HOME.'/.vimshell_hist',
|
||||
\ 'scheme' : $HOME.'/.gosh_completions'
|
||||
\ }
|
||||
call neocomplete#custom#source('_', 'sorters', [])
|
||||
|
||||
if !exists('g:neocomplete#sources')
|
||||
let g:neocomplete#sources = {}
|
||||
endif
|
||||
if !exists('g:neocomplete#keyword_patterns')
|
||||
let g:neocomplete#keyword_patterns = {}
|
||||
endif
|
||||
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
|
||||
let g:neocomplete#enable_auto_select = 1
|
||||
let g:neocomplete#disable_auto_complete = 0
|
||||
inoremap <expr><C-l> neocomplete#complete_common_string()
|
||||
inoremap <expr><C-h> pumvisible() ? neocomplete#cancel_popup() : "\<C-h>"
|
||||
imap <expr><Tab> pumvisible() ? neocomplete#close_popup() : "\<Tab>"
|
||||
if !exists('g:neocomplete#sources#omni#input_patterns')
|
||||
let g:neocomplete#sources#omni#input_patterns = {}
|
||||
endif
|
||||
let g:neocomplete#force_overwrite_completefunc = 1
|
||||
let g:neocomplete#sources.cs = ['omni']
|
||||
let g:neocomplete#sources#omni#input_patterns.cs = '.*[^-!@%?/|&\{}\+\*\(<>\")\=);]'
|
||||
let g:neocomplete#sources#omni#input_patterns.js = '[^. \t]\.\w*'
|
||||
let g:neocomplete#sources#omni#input_patterns.c = '[^[:digit:] *;\{\()]\w*'
|
||||
let g:neocomplete#sources#omni#input_patterns.lua = '[^. \t]\.\w*'
|
||||
let g:clang_complete_auto=1
|
||||
let g:clang_auto_select=0
|
||||
let g:clang_use_library=1
|
||||
let g:neocomplete#enable_refresh_always = 0
|
||||
augroup js_aus
|
||||
autocmd!
|
||||
autocmd FileType javascript setlocal omnifunc=tern#Complete
|
||||
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
||||
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
||||
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
||||
augroup END
|
||||
|
||||
" NeoSnippet
|
||||
imap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
smap <C-s> <Plug>(neosnippet_expand_or_jump)
|
||||
xmap <C-s> <Plug>(neosnippet_expand_target)
|
||||
let g:neosnippet#enable_snipmate_compatibility = 1
|
||||
let g:neosnippet#snippets_directory='~/.vim/snippet'
|
||||
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
|
||||
\ "\<Plug>(neosnippet_expand_or_jump)"
|
||||
\: "\<TAB>"
|
||||
|
||||
if has('conceal')
|
||||
set conceallevel=2 concealcursor=i
|
||||
endif
|
||||
"
|
Loading…
x
Reference in New Issue
Block a user