Update i3 and UltiSnips snippets

This commit is contained in:
foo-dogsquared 2019-08-25 00:25:57 +08:00
parent 3bf8c5b761
commit dfefb45564
2 changed files with 31 additions and 2 deletions

View File

@ -156,6 +156,10 @@ bindsym Control+Print exec ~/.scripts/maim-screenshot.sh --select
bindsym Shift+Print exec ~/.scripts/maim-screenshot.sh --delay 3
bindsym Control+Shift+Print exec ~/.scripts/maim-screenshot.sh --select --delay 3
# Screen record (Alt + Print)
bindsym $mod+Print exec ~/.scripts/screen-record.sh --scene barless-screen
bindsym $mod+Shift+Print exec ~/.scripts/screen-record.sh --scene fullscreen
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $web_ws "1"

View File

@ -165,6 +165,30 @@ snippet ref "Create a reference for a label" bi
\ref{${1:<label to be referenced>}} $0
endsnippet
snippet eqref "Quick equation reference command" wi
Equation \ref{eq:$1} $0
endsnippet
snippet figref "Quick figure reference command" wi
figure \ref{fig:$1} $0
endsnippet
snippet tabref "Quick table referenece command" wi
table \ref{tab:$1} $0
endsnippet
snippet chref "Quick chapter reference command" wi
chapter \ref{ch:$1} $0
endsnippet
snippet secref "Quick section reference command" wi
section \ref{sec:$1} $0
endsnippet
snippet subsecref "Quick subsection reference command" wi
subsection \ref{subsec:$1} $0
endsnippet
snippet foot "Footnote" w
\footnote{${1:<text>}} $0
endsnippet
@ -183,7 +207,8 @@ endsnippet
snippet mb "Math block" bi
\begin{equation*}
$1
`!p snip.rv=smart_space(t[1], "\label{eq:", loose=True)`$1`!p snip.rv=smart_space(t[1], "}", loose=True)`
$2
\end{equation*}
$0
endsnippet
@ -833,7 +858,7 @@ $0
endsnippet
snippet a "URL links (with description)" iw
\href{${1:<url>}{${2:<description>}}$0
\href{${1:<url>}}{${2:<description>}} $0
endsnippet
snippet al "Reference links with label" iw