diff --git a/.config/coc/ultisnips/html.snippets b/.config/coc/ultisnips/html.snippets new file mode 100644 index 0000000..58ba4d9 --- /dev/null +++ b/.config/coc/ultisnips/html.snippets @@ -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 +$0 +endsnippet + +snippet ,it "Italics" A +$0 +endsnippet + +snippet ,1 "Header 1" A +

$0

+endsnippet + +snippet ,2 "Header 2" A +

$0

+endsnippet + +snippet ,3 "Header 3" A +

$0

+endsnippet + +snippet ,p "Paragraph" A +

$0

+endsnippet + +snippet ,a "Hyperlink" A +$1 +endsnippet + +snippet ,e "External Hyperlink" A +$1 +endsnippet + +snippet ,ul "Itemization" A + +endsnippet + +snippet ,li "List Element" A +
  • $0
  • +endsnippet + +snippet ,ol "Enumeration" A +
      +
    1. $0
    2. +
    +endsnippet + +snippet ,im "Image" A +$1 +endsnippet + +snippet & "Et Sign" A +& +endsnippet diff --git a/.config/coc/ultisnips/tex.snippets b/.config/coc/ultisnips/tex.snippets new file mode 100644 index 0000000..35963fb --- /dev/null +++ b/.config/coc/ultisnips/tex.snippets @@ -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 diff --git a/.config/coc/ultisnips/vim.snippets b/.config/coc/ultisnips/vim.snippets new file mode 100644 index 0000000..caf3f05 --- /dev/null +++ b/.config/coc/ultisnips/vim.snippets @@ -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 diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 510ec23..6dde205 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -51,12 +51,6 @@ map :set spelllang=en_us " Read files correctly autocmd BufRead,BufNewFile *.tex set filetype=tex -""" Shortcuts -" Navigating with guides -inoremap /<++>"_c4l -vnoremap /<++>"_c4l -map /<++>"_c4l - " Compiler for languages map c :w! \| !compiler % @@ -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 @@ -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 <++>FbT>i -autocmd FileType html inoremap ,it <++>FeT>i -autocmd FileType html inoremap ,1

    <++>2kf<++>2kf<++>2kf

    <++>02kf>a -autocmd FileType html inoremap ,a href=""><++><++>14hi -autocmd FileType html inoremap ,e target="_blank"href=""><++><++>14hi -autocmd FileType html inoremap ,ul
    <++>03kfo
  • F>a -autocmd FileType html inoremap ,ol
    <++>03kf<++>Fcf"a -autocmd FileType html inoremap & & -autocmd FileType html inoremap ä ä -autocmd FileType html inoremap ë ë -autocmd FileType html inoremap ï ï -autocmd FileType html inoremap ö ö -autocmd FileType html inoremap ü ü - -"" LATEX -autocmd FileType tex inoremap ,fr \begin{frame}\frametitle{}<++>\end{frame}<++>6kf}i -autocmd FileType tex inoremap ,em \emph{}<++>T{i -autocmd FileType tex inoremap ,bf \textbf{}<++>T{i -autocmd FileType tex inoremap ,it \textit{}<++>T{i -autocmd FileType tex inoremap ,ct \textcite{}<++>T{i -autocmd FileType tex inoremap ,cp \parencite{}<++>T{i -autocmd FileType tex inoremap ,ol \begin{enumerate}\end{enumerate}<++>3kA\item -autocmd FileType tex inoremap ,ul \begin{itemize}\end{itemize}<++>3kA\item -autocmd FileType tex inoremap ,li \item -autocmd FileType tex inoremap ,ref \ref{}<++>T{i -autocmd FileType tex inoremap ,tab \begin{tabular}<++>\end{tabular}<++>4kA{}i -autocmd FileType tex inoremap ,a \href{}{<++>}<++>2T{i -autocmd FileType tex inoremap ,sc \textsc{}<++>T{i -autocmd FileType tex inoremap ,chap \chapter{}<++>2kf}i -autocmd FileType tex inoremap ,sec \section*{}<++>2kf}i -autocmd FileType tex inoremap ,ssec \subsection*{}<++>2kf}i -autocmd FileType tex inoremap ,sssec \subsubsection*{}<++>2kf}i -autocmd FileType tex inoremap ,beg \begin{DELRN}<++>\end{DELRN}<++>4k0fR:MultipleCursorsFindDELRNc -autocmd FileType tex inoremap ,up /usepackageo\usepackage{}i -autocmd FileType tex nnoremap ,up /usepackageo\usepackage{}i -autocmd FileType tex inoremap ,tt \texttt{}<++>T{i -