dotfiles now with some other completion thingie

master
TiynGER 5 years ago
parent 994b80ba85
commit d23166f399

@ -0,0 +1,81 @@
# A valid snippet should starts with:
#
# snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
# endsnippet
#
# Snippet options:
#
# b - Beginning of line.
# i - In-word expansion.
# w - Word boundary.
# r - Regular expression
# e - Custom context snippet
# A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
# snippet emitter "emitter properties" b
# private readonly ${1} = new Emitter<$2>()
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
# endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
snippet ,b "Bold" A
<b>$0</b>
endsnippet
snippet ,it "Italics" A
<em>$0</em>
endsnippet
snippet ,1 "Header 1" A
<h1>$0</h1>
endsnippet
snippet ,2 "Header 2" A
<h2>$0</h2>
endsnippet
snippet ,3 "Header 3" A
<h3>$0</h3>
endsnippet
snippet ,p "Paragraph" A
<p>$0</p>
endsnippet
snippet ,a "Hyperlink" A
<a href="$0">$1</a>
endsnippet
snippet ,e "External Hyperlink" A
<a target="_blank" href="$0">$1</a>
endsnippet
snippet ,ul "Itemization" A
<ul>
<li>$0</li>
</ul>
endsnippet
snippet ,li "List Element" A
<li>$0</li>
endsnippet
snippet ,ol "Enumeration" A
<ol>
<li>$0</li>
</ol>
endsnippet
snippet ,im "Image" A
<img src="$0" alt="$1">
endsnippet
snippet & "Et Sign" A
&amp;
endsnippet

@ -0,0 +1,114 @@
# A valid snippet should starts with:
#
# snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
# endsnippet
#
# Snippet options:
#
# b - Beginning of line.
# i - In-word expansion.
# w - Word boundary.
# r - Regular expression
# e - Custom context snippet
# A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
# snippet emitter "emitter properties" b
# private readonly ${1} = new Emitter<$2>()
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
# endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
snippet ,fr "Frame" A
\begin{frame}
\frametitle{}
$0
\end{frame}
endsnippet
snippet ,em "Emphasis" A
\emph{$0}
endsnippet
snippet ,bf "Bold" A
\textbf{$0}
endsnippet
snippet ,it "Italic" A
\textit{$0}
endsnippet
snippet ,ct "Text cite" A
\textcite{$0}
endsnippet
snippet ,cp "Parenthesis cite" A
\parencite{$0}
endsnippet
snippet ,ol "Enumeration" A
\begin{enumerate}
\item $0
\end{enumerate}
endsnippet
snippet ,ul "Itemization" A
\begin{itemize}
\item $0
\end{itemize}
endsnippet
snippet ,li "List element" A
\item $0
endsnippet
snippet ,ref "Reference" A
\ref{$0}
endsnippet
snippet ,tab "Tabular" A
\begin{tabular}
$0
\end{tabular}
endsnippet
snippet ,a "Hyperlink" A
\href{$0}{$1}
endsnippet
snippet ,sc "Small caps" A
\textsc{$0}
endsnippet
snippet ,chap "Chapter" A
\chapter{$0}
$1
endsnippet
snippet ,sec "Section" A
\section{$0}
$1
endsnippet
snippet ,ssec "Subsection" A
\subsection{$0}
$1
endsnippet
snippet ,sssec "Subsubsection" A
\subsubsection{$0}
$1
endsnippet
snippet ,up "Use Packagage" A
\usepackage{$0}
endsnippet
snippet ,tt "Typewriter" A
\texttt{$0}
endsnippet

@ -0,0 +1,25 @@
# A valid snippet should starts with:
#
# snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
# endsnippet
#
# Snippet options:
#
# b - Beginning of line.
# i - In-word expansion.
# w - Word boundary.
# r - Regular expression
# e - Custom context snippet
# A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
# snippet emitter "emitter properties" b
# private readonly ${1} = new Emitter<$2>()
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
# endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt

@ -51,12 +51,6 @@ map <F6> :set spelllang=en_us<CR>
" Read files correctly
autocmd BufRead,BufNewFile *.tex set filetype=tex
""" Shortcuts
" Navigating with guides
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
map <leader><leader> <Esc>/<++><Enter>"_c4l
" Compiler for languages
map <leader>c :w! \| !compiler <c-r>%<CR>
@ -79,7 +73,7 @@ Plug 'qpkorr/vim-renamer' " Bulk renamer
call plug#end()
" Coc extensions
let g:coc_global_extensions = ['coc-snippets', 'coc-vimtex', 'coc-snippets']
let g:coc_global_extensions = ['coc-snippets', 'coc-vimtex']
" Coc remaps
inoremap <silent><expr> <TAB>
@ -107,47 +101,3 @@ let g:neotex_enabled = 2
" CoVim
let CoVim_default_name = "TiynGER"
let CoVim_default_port = "7000"
"""HTML
autocmd FileType html inoremap ,b <b></b><Space><++><Esc>FbT>i
autocmd FileType html inoremap ,it <em></em><Space><++><Esc>FeT>i
autocmd FileType html inoremap ,1 <h1></h1><Enter><Enter><++><Esc>2kf<i
autocmd FileType html inoremap ,2 <h2></h2><Enter><Enter><++><Esc>2kf<i
autocmd FileType html inoremap ,3 <h3></h3><Enter><Enter><++><Esc>2kf<i
autocmd FileType html inoremap ,p <p></p><Enter><Enter><++><Esc>02kf>a
autocmd FileType html inoremap ,a <a<Space>href=""><++></a><Space><++><Esc>14hi
autocmd FileType html inoremap ,e <a<Space>target="_blank"<Space>href=""><++></a><Space><++><Esc>14hi
autocmd FileType html inoremap ,ul <ul><Enter><li></li><Enter></ul><Enter><Enter><++><Esc>03kf<i
autocmd FileType html inoremap ,li <Esc>o<li></li><Esc>F>a
autocmd FileType html inoremap ,ol <ol><Enter><li></li><Enter></ol><Enter><Enter><++><Esc>03kf<i
autocmd FileType html inoremap ,im <img src="" alt="<++>"><++><esc>Fcf"a
autocmd FileType html inoremap &<space> &amp;<space>
autocmd FileType html inoremap ä &auml;
autocmd FileType html inoremap ë &euml;
autocmd FileType html inoremap ï &iuml;
autocmd FileType html inoremap ö &ouml;
autocmd FileType html inoremap ü &uuml;
"" LATEX
autocmd FileType tex inoremap ,fr \begin{frame}<Enter>\frametitle{}<Enter><Enter><++><Enter><Enter>\end{frame}<Enter><Enter><++><Esc>6kf}i
autocmd FileType tex inoremap ,em \emph{}<++><Esc>T{i
autocmd FileType tex inoremap ,bf \textbf{}<++><Esc>T{i
autocmd FileType tex inoremap ,it \textit{}<++><Esc>T{i
autocmd FileType tex inoremap ,ct \textcite{}<++><Esc>T{i
autocmd FileType tex inoremap ,cp \parencite{}<++><Esc>T{i
autocmd FileType tex inoremap ,ol \begin{enumerate}<Enter><Enter>\end{enumerate}<Enter><Enter><++><Esc>3kA\item<Space>
autocmd FileType tex inoremap ,ul \begin{itemize}<Enter><Enter>\end{itemize}<Enter><Enter><++><Esc>3kA\item<Space>
autocmd FileType tex inoremap ,li <Enter>\item<Space>
autocmd FileType tex inoremap ,ref \ref{}<Space><++><Esc>T{i
autocmd FileType tex inoremap ,tab \begin{tabular}<Enter><++><Enter>\end{tabular}<Enter><Enter><++><Esc>4kA{}<Esc>i
autocmd FileType tex inoremap ,a \href{}{<++>}<Space><++><Esc>2T{i
autocmd FileType tex inoremap ,sc \textsc{}<Space><++><Esc>T{i
autocmd FileType tex inoremap ,chap \chapter{}<Enter><Enter><++><Esc>2kf}i
autocmd FileType tex inoremap ,sec \section*{}<Enter><Enter><++><Esc>2kf}i
autocmd FileType tex inoremap ,ssec \subsection*{}<Enter><Enter><++><Esc>2kf}i
autocmd FileType tex inoremap ,sssec \subsubsection*{}<Enter><Enter><++><Esc>2kf}i
autocmd FileType tex inoremap ,beg \begin{DELRN}<Enter><++><Enter>\end{DELRN}<Enter><Enter><++><Esc>4k0fR:MultipleCursorsFind<Space>DELRN<Enter>c
autocmd FileType tex inoremap ,up <Esc>/usepackage<Enter>o\usepackage{}<Esc>i
autocmd FileType tex nnoremap ,up /usepackage<Enter>o\usepackage{}<Esc>i
autocmd FileType tex inoremap ,tt \texttt{}<Space><++><Esc>T{i

Loading…
Cancel
Save