summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito G. Graffagnino <vito@graffagnino.xyz>2022-10-08 11:57:32 +0100
committerVito G. Graffagnino <vito@graffagnino.xyz>2022-10-08 11:57:32 +0100
commitab8abc7f22d2345690b469a5e3bde9f3d63ac180 (patch)
tree8034ed8a16e9712f9f244a3d0ffc26466defa2de
parent02af2c0299b923946092a49cdbae20ba837cb4be (diff)
Fixed orgmode error message relating to treesitter. Added another latex
template. Tidied up a number of other files
-rw-r--r--init.lua6
-rw-r--r--lua/user/autocommands.lua1
-rw-r--r--lua/user/cmp.lua2
-rw-r--r--lua/user/jaq.lua80
-rw-r--r--lua/user/keymaps.lua8
-rw-r--r--lua/user/orgmode.lua10
-rw-r--r--lua/user/pandoc.lua5
-rw-r--r--lua/user/plugins.lua15
-rw-r--r--lua/user/toggleterm.lua10
-rw-r--r--lua/user/treesitter.lua34
-rw-r--r--lua/user/zenmode.lua3
-rw-r--r--luasnip_snippets/latex.json1302
12 files changed, 1437 insertions, 39 deletions
diff --git a/init.lua b/init.lua
index 4c04893..a6cc905 100644
--- a/init.lua
+++ b/init.lua
@@ -10,7 +10,6 @@ require "user.autopairs"
require "user.autocommands"
require "user.comment"
require "user.dap"
---require "user.orgmode"
require "user.gitsigns"
require "user.icons"
require "user.illuminate"
@@ -24,5 +23,8 @@ require "user.indentline"
require "user.impatient"
require "user.whichkey"
require "user.snippet-converter"
-require "user.pandoc"
+require "user.zenmode"
+require "user.jaq"
+require "user.orgmode"
+-- require "user.pandoc"
-- require "user.nabla"
diff --git a/lua/user/autocommands.lua b/lua/user/autocommands.lua
index 1c27d6e..a991963 100644
--- a/lua/user/autocommands.lua
+++ b/lua/user/autocommands.lua
@@ -28,7 +28,6 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
local buf_ft = vim.bo.filetype
if buf_ft == "" or buf_ft == nil then
vim.cmd [[
- nnoremap <silent> <buffer> q :close<CR>
nnoremap <silent> <buffer> <c-j> j<CR>
nnoremap <silent> <buffer> <c-k> k<CR>
set nobuflisted
diff --git a/lua/user/cmp.lua b/lua/user/cmp.lua
index 9f115e7..44c22f2 100644
--- a/lua/user/cmp.lua
+++ b/lua/user/cmp.lua
@@ -20,10 +20,12 @@ end
-- return split_lines(search_result)
-- end
+require("luasnip/loaders/from_vscode").lazy_load()
require("luasnip/loaders/from_vscode").lazy_load({
-- paths = glob_runtimepath('luasnip_snippets/*.json')
paths = "~/.config/nvim/luasnip_snippets/*.json"
})
+require("luasnip/loaders/from_snipmate").lazy_load()
local check_backspace = function()
local col = vim.fn.col "." - 1
diff --git a/lua/user/jaq.lua b/lua/user/jaq.lua
new file mode 100644
index 0000000..9ea672e
--- /dev/null
+++ b/lua/user/jaq.lua
@@ -0,0 +1,80 @@
+M = {}
+local status_ok, jaq_nvim = pcall(require, "jaq-nvim")
+if not status_ok then
+ return
+end
+
+jaq_nvim.setup {
+ -- Commands used with 'Jaq'
+ cmds = {
+ -- Default UI used (see `Usage` for options)
+ default = "term",
+
+ -- Uses external commands such as 'g++' and 'cargo'
+ external = {
+ typescript = "deno run %",
+ javascript = "node %",
+ -- markdown = "glow %",
+ python = "ipython %",
+ -- rust = "rustc % && ./$fileBase && rm $fileBase",
+ rust = "cargo run",
+ cpp = "g++ % -o $fileBase && ./$fileBase",
+ go = "go run %",
+ sh = "sh %",
+ },
+
+ -- Uses internal commands such as 'source' and 'luafile'
+ internal = {
+ -- lua = "luafile %",
+ -- vim = "source %",
+ },
+ },
+
+ behavior = {
+ -- Default type
+ default = "terminal",
+
+ -- Start in insert mode
+ startinsert = false,
+
+ -- Use `wincmd p` on startup
+ wincmd = false,
+
+ -- Auto-save files
+ autosave = false,
+ },
+
+ -- UI settings
+ ui = {
+ -- Floating Window / FTerm settings
+ float = {
+ -- Floating window border (see ':h nvim_open_win')
+ border = "none",
+
+ -- Num from `0 - 1` for measurements
+ height = 0.8,
+ width = 0.8,
+ x = 0.5,
+ y = 0.5,
+
+ -- Highlight group for floating window/border (see ':h winhl')
+ border_hl = "FloatBorder",
+ float_hl = "Normal",
+
+ -- Floating Window Transparency (see ':h winblend')
+ blend = 0,
+ },
+
+ terminal = {
+ -- Position of terminal
+ position = "vert",
+
+ -- Open the terminal without line numbers
+ line_no = false,
+
+ -- Size of terminal
+ size = 60,
+ },
+ },
+}
+return M
diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua
index a1388d7..04987a4 100644
--- a/lua/user/keymaps.lua
+++ b/lua/user/keymaps.lua
@@ -64,6 +64,7 @@ keymap("t", "<C-h>", "<C-\\><C-N><C-w>h", term_opts)
keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", term_opts)
keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
+keymap("t", "<C-p>", ":ToggleTermSendVisualSelection", term_opts)
-- Open corresponding .pdf/.html or preview
keymap("n","<leader>p", ":!opout <C-r>%<CR><CR>", opts)
@@ -104,3 +105,10 @@ keymap("n", "<leader>P", ":<cmd>lua require('nabla').popup()<CR>", opts)
keymap("n", "<leader><A-e><A-p>", ":<cmd>lua require('pandoc').equation.show()<CR>", opts)
keymap("n", "<leader><A-p><A-r>", ":<cmd>lua require('pandoc').render.init()<CR>", opts)
keymap("n", "<leader><A-p><A-s>", ":<cmd>lua require('pandoc').render.build({ input = vim.api.nvim_get_buf_name(0), args = {{'--standalone'},{'toc'},{'--filter','pandoc-crossref'},{'--pdf-engine','xelatex'}}, output = 'pandoc.pdf' })<CR>", opts)
+
+--Jaq
+keymap("n", "<m-r>", ":silent only | Jaq<cr>", opts)
+
+--Zen Mode
+keymap("n", "<localleader>zm", ":ZenMode<cr>", opts)
+
diff --git a/lua/user/orgmode.lua b/lua/user/orgmode.lua
index 7c0443e..c1a1a4e 100644
--- a/lua/user/orgmode.lua
+++ b/lua/user/orgmode.lua
@@ -1,12 +1,10 @@
-local orgmode_status_ok = pcall(require, "orgmode")
+local orgmode_status_ok, orgmode = pcall(require, "orgmode")
if not orgmode_status_ok then
return
end
-require("orgmode").setup_ts_grammer()
-require("orgmode").setup({
+orgmode.setup({
org_agenda_files = {'~/org/**/*'},
org_default_notes_files = {'~/org/refile.org'}
-})
-
-
+}
+)
diff --git a/lua/user/pandoc.lua b/lua/user/pandoc.lua
index 40b3e9a..099cf50 100644
--- a/lua/user/pandoc.lua
+++ b/lua/user/pandoc.lua
@@ -2,7 +2,4 @@ local status_ok = pcall(require, "pandoc")
if not status_ok then
return
end
-
-local pandoc =require "pandoc"
-
-pandoc.setup()
+require "pandoc".setup()
diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua
index 451b55f..713c2d2 100644
--- a/lua/user/plugins.lua
+++ b/lua/user/plugins.lua
@@ -52,12 +52,15 @@ return packer.startup(function(use)
use {"kyazdani42/nvim-tree.lua", commit = ""}
use {"lewis6991/impatient.nvim", commit = ""}
use {"lukas-reineke/indent-blankline.nvim", commit = ""}
- --use {"moll/vim-bbye", commit = ""}
+ use {"moll/vim-bbye", commit = ""}
use {"numToStr/Comment.nvim", commit = ""} -- Easily comment stuff
use {"nvim-lualine/lualine.nvim", commit = ""}
use {"windwp/nvim-autopairs", commit = ""} -- Autopairs, integrates with both cmp and treesitter
use {"vimwiki/vimwiki", commit = ""}
use {"zane-/howdoi.nvim", commit = ""}
+ use {"folke/zen-mode.nvim", commit = ""}
+ use {"nvim-orgmode/orgmode", commit = ""}
+ use {"mickael-menu/zk-nvim", commit = ""}
-- Colorschemes
use {"lunarvim/colorschemes", commit = ""} -- A bunch of colorschemes you can try out
@@ -97,7 +100,7 @@ return packer.startup(function(use)
use {"rafamadriz/friendly-snippets", commit = ""} -- a bunch of snippets to use
use {"smjonas/snippet-converter.nvim", commit = ""}
- use {"SirVer/ultisnips", commit = ""} --snippet engine
+ -- use {"SirVer/ultisnips", commit = ""} --snippet engine
use {"honza/vim-snippets", commit = ""} --snippets to use
-- use {"molleweide/LuaSnip-snippets.nvim", commit = ""} -- a bunch of snippets to use
@@ -115,10 +118,8 @@ return packer.startup(function(use)
use {"nvim-telescope/telescope-dap.nvim", commit = ""}
-- Treesitter
- use {
- "nvim-treesitter/nvim-treesitter", commit = "",
- run = ":TSUpdate",
- }
+ use { "nvim-treesitter/nvim-treesitter", require('orgmode').setup_ts_grammar(), run = ":TSUpdate"}
+ use {"nvim-treesitter/nvim-treesitter-textobjects"}
use {"JoosepAlviste/nvim-ts-context-commentstring", commit = ""}
use {"windwp/nvim-ts-autotag", commit = ""}
use {"romgrk/nvim-treesitter-context", commit = ""}
@@ -152,6 +153,8 @@ return packer.startup(function(use)
use {"GCBallesteros/jupytext.vim", commit = ""}
use {"dccsillag/magma-nvim", commit = "", run = ":UpdateRemotePlugins" }
+ -- Code runner
+ use {"is0n/jaq-nvim"}
diff --git a/lua/user/toggleterm.lua b/lua/user/toggleterm.lua
index c08f5d0..7342573 100644
--- a/lua/user/toggleterm.lua
+++ b/lua/user/toggleterm.lua
@@ -4,7 +4,13 @@ if not status_ok then
end
toggleterm.setup({
- size = 20,
+ size = function(term)
+ if term.direction == "horizontal" then
+ return 20
+ elseif term.direction == "vertical" then
+ return vim.o.columns * 0.45
+ end
+ end,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_filetypes = {},
@@ -13,7 +19,7 @@ toggleterm.setup({
start_in_insert = true,
insert_mappings = true,
persist_size = true,
- direction = "float",
+ direction = "vertical",
close_on_exit = true,
shell = vim.o.shell,
float_opts = {
diff --git a/lua/user/treesitter.lua b/lua/user/treesitter.lua
index 99fa7ec..5c1e390 100644
--- a/lua/user/treesitter.lua
+++ b/lua/user/treesitter.lua
@@ -1,28 +1,28 @@
+local status_ok, configs = pcall(require, "nvim-treesitter.configs")
+if not status_ok then
+ return
+end
+
+local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
+parser_config.org = {
+ install_info = {
+ url = 'https://github.com/milisims/tree-sitter-org',
+ revision = 'main',
+ files = { 'src/parser.c', 'src/scanner.cc' },
+ },
+ filetype = 'org',
+}
-
-
-
-
-
-
-
-
-
-
-
-
-
-local configs = require("nvim-treesitter.configs")
configs.setup {
- ensure_installed = {"python","lua","json","org"},
- sync_install = false,
+ ensure_installed = {"org","python","lua","json"},
+ sync_install = false,
ignore_install = { "" }, -- List of parsers to ignore installing
autopairs = {
enable = true,
},
highlight = {
enable = true, -- false will disable the whole extension
- disable = { "" }, -- list of language that will be disabled
+ disable = { "org" }, -- list of language that will be disabled
additional_vim_regex_highlighting = true,
},
diff --git a/lua/user/zenmode.lua b/lua/user/zenmode.lua
new file mode 100644
index 0000000..3459de0
--- /dev/null
+++ b/lua/user/zenmode.lua
@@ -0,0 +1,3 @@
+local config = require("zen-mode")
+config.setup {
+}
diff --git a/luasnip_snippets/latex.json b/luasnip_snippets/latex.json
index 38979cf..da5d9b1 100644
--- a/luasnip_snippets/latex.json
+++ b/luasnip_snippets/latex.json
@@ -554,5 +554,1305 @@
"prefix": "SSP",
"body": "\\subparagraph{${1:${TM_SELECTED_TEXT}}}",
"description": "subparagraph"
- }
+ },
+ "Align(ed)": {
+ "prefix": "ali",
+ "body": [
+ "\\begin{align}",
+ "\t$0",
+ "\\end{align}"
+ ],
+ "description": "Align(ed)"
+ },
+ "Cases": {
+ "prefix": "cas",
+ "body": [
+ "\\begin{cases}",
+ "\t${1:equation}, &\\text{ if }${2:case}\\\\\\\\",
+ "\t$0",
+ "\\end{cases}"
+ ],
+ "description": "Cases"
+ },
+ "Chapter": {
+ "prefix": "cha",
+ "body": [
+ "\\chapter{${1:chapter name}} % (fold)",
+ "\\label{cha:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% chapter $2 (end)"
+ ],
+ "description": "Chapter"
+ },
+ "Description": {
+ "prefix": "desc",
+ "body": [
+ "\\\\begin{description}",
+ "\t\\item[$1] $0",
+ "\\\\end{description}"
+ ],
+ "description": "Description"
+ },
+ "Math": {
+ "prefix": "math",
+ "body": [
+ "\\begin{math}",
+ "\t$1",
+ "\\end{math}",
+ "$0"
+ ],
+ "description": "Add a Math"
+ },
+ "DisplayMath": {
+ "prefix": "displaymath",
+ "body": [
+ "\\begin{displaymath}",
+ "\t$1",
+ "\\end{displaymath}",
+ "$0"
+ ],
+ "description": "Display Math"
+ },
+ "Equation": {
+ "prefix": "equation",
+ "body": [
+ "\\begin{equation}",
+ "\t$0",
+ "\t\\label{eq:$1}",
+ "\\end{equation}"
+ ],
+ "description": "Add a Equation"
+ },
+ "Display Math — \\[ … \\]": {
+ "prefix": "$$",
+ "body": [
+ "\\[",
+ "\t$TM_SELECTED_TEXT$1",
+ "\\]"
+ ],
+ "description": "Display Math"
+ },
+ "Theorem": {
+ "prefix": "theorem",
+ "body": [
+ "\\begin{theorem}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{theorem}",
+ "$0"
+ ],
+ "description": "Add a theorem"
+ },
+ "Definition": {
+ "prefix": "definition",
+ "body": [
+ "\\begin{definition}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{definition}",
+ "$0"
+ ],
+ "description": "Add a definition"
+ },
+ "Proof": {
+ "prefix": "proof",
+ "body": [
+ "\\begin{proof}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{proof}",
+ "$0"
+ ],
+ "description": "Add a proof"
+ },
+ "Algorithm": {
+ "prefix": "algo",
+ "body": [
+ "% \\usepackage{algorithm,algorithmicx,algpseudocode}",
+ "\\begin{algorithm}",
+ "\t\\floatname{algorithm}{${1:Algorithm}}",
+ "\t\\algrenewcommand\\algorithmicrequire{\\textbf{${2:Input: }}}",
+ "\t\\algrenewcommand\\algorithmicensure{\\textbf{${3:Output: }}}",
+ "\t\\caption{$4}",
+ "\t\\label{alg:$5}",
+ "\t\\begin{algorithmic}[1]",
+ "\t\t\\Require \\$input\\$",
+ "\t\t\\Ensure \\$output\\$",
+ "\t\t$6",
+ "\t\t\\State \\textbf{return} \\$state\\$",
+ "\t\\end{algorithmic}",
+ "\\end{algorithm}",
+ "$0"
+ ],
+ "description": "Add an algorithm"
+ },
+ "Algorithm:State": {
+ "prefix": "state",
+ "body": [
+ "\\State $1"
+ ],
+ "desciption": "Add an statement of algorithm"
+ },
+ "Algorithm:If": {
+ "prefix": "if",
+ "body": [
+ "\\If{$1}",
+ "\\ElsIf{$2}",
+ "\\Else",
+ "\\EndIf"
+ ],
+ "desciption": "Add an if statement of algorithm"
+ },
+ "Algorithm:For": {
+ "prefix": "for",
+ "body": [
+ "\\For{i=0:$1}",
+ "\t\\State $0",
+ "\\EndFor"
+ ],
+ "desciption": "Add an for statement of algorithm"
+ },
+ "Algorithm:While": {
+ "prefix": "while",
+ "body": [
+ "\\While{$1}",
+ "\t\\State $0",
+ "\\EndWhile"
+ ],
+ "desciption": "Add an for statement of algorithm"
+ },
+ "Algorithm:Ref": {
+ "prefix": "algo:ref",
+ "body": [
+ "${1:Algorithm}~\\ref{algo:$2}$0"
+ ],
+ "desciption": "Ref for Algorithm"
+ },
+ "Figure:Ref": {
+ "prefix": "figure:ref",
+ "body": [
+ "${1:Figure}~\\ref{fig:$2}$0"
+ ],
+ "description": "Ref for Figure"
+ },
+ "Gather(ed)": {
+ "prefix": "gat",
+ "body": [
+ "\\begin{gather}",
+ "\t$0",
+ "\\end{gather}"
+ ],
+ "description": "Gather(ed)"
+ },
+ "Itemize": {
+ "prefix": "item",
+ "body": [
+ "\\\\begin{itemize}",
+ "\t\\item $0",
+ "\\\\end{itemize}"
+ ],
+ "description": "Itemize"
+ },
+ "Listing:Ref": {
+ "prefix": "listing:ref",
+ "body": [
+ "${1:Listing}~\\ref{lst:$2}$0"
+ ],
+ "description": "Listing"
+ },
+ "Matrix": {
+ "prefix": "mat",
+ "body": [
+ "\\begin{${1:p/b/v/V/B/small}matrix}",
+ "\t$0",
+ "\\end{${1:p/b/v/V/B/small}matrix}"
+ ],
+ "description": "Matrix"
+ },
+ "Page": {
+ "prefix": "page",
+ "body": [
+ "${1:page}~\\pageref{$2}$0"
+ ],
+ "description": "Page"
+ },
+ "Paragraph": {
+ "prefix": "par",
+ "body": [
+ "\\paragraph{${1:paragraph name}} % (fold)",
+ "\\label{par:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% paragraph $2 (end)"
+ ],
+ "description": "Paragraph"
+ },
+ "Part": {
+ "prefix": "part",
+ "body": [
+ "\\part{${1:part name}} % (fold)",
+ "\\label{prt:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% part $2 (end)"
+ ],
+ "description": "Part"
+ },
+ "Region Start": {
+ "prefix": "#region",
+ "body": [
+ "%#Region $0"
+ ],
+ "description": "Folding Region Start"
+ },
+ "Region End": {
+ "prefix": "#endregion",
+ "body": [
+ "%#Endregion"
+ ],
+ "description": "Folding Region End"
+ },
+ "Section:Ref": {
+ "prefix": "section:ref",
+ "body": [
+ "${1:Section}~\\ref{sec:$2}$0"
+ ],
+ "description": "Section Reference"
+ },
+ "Split": {
+ "prefix": "spl",
+ "body": [
+ "\\begin{split}",
+ "\t$0",
+ "\\end{split}"
+ ],
+ "description": "Split"
+ },
+ "Section": {
+ "prefix": "sec",
+ "body": [
+ "\\section{${1:section name}} % (fold)",
+ "\\label{sec:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% section $2 (end)"
+ ],
+ "description": "Section"
+ },
+ "Sub Paragraph": {
+ "prefix": "subp",
+ "body": [
+ "\\subparagraph{${1:subparagraph name}} % (fold)",
+ "\\label{subp:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subparagraph $2 (end)"
+ ],
+ "description": "Sub Paragraph"
+ },
+ "Sub Section": {
+ "prefix": "sub",
+ "body": [
+ "\\subsection{${1:subsection name}} % (fold)",
+ "\\label{sub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subsection $2 (end)"
+ ],
+ "description": "Sub Section"
+ },
+ "Sub Sub Section": {
+ "prefix": "subs",
+ "body": [
+ "\\subsubsection{${1:subsubsection name}} % (fold)",
+ "\\label{ssub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subsubsection $2 (end)"
+ ],
+ "description": "Sub Sub Section"
+ },
+ "Table:Ref": {
+ "prefix": "table:ref",
+ "body": [
+ "${1:Table}~\\ref{tab:$2}$0"
+ ],
+ "description": "Table Reference"
+ },
+ "Tabular": {
+ "prefix": "tab",
+ "body": [
+ "\\\\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}",
+ "$0${2/((?<=[clr])([ |]*(c|l|r)))|./(?1: & )/g}",
+ "\\\\end{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}"
+ ],
+ "description": "Tabular"
+ },
+ "\\begin{}…\\end{}": {
+ "prefix": "begin",
+ "body": [
+ "\\\\begin{${1:env}}",
+ "\t${1/(enumerate|itemize|list)|(description)|.*/(?1:\\item )(?2:\\item)/}$0",
+ "\\\\end{${1:env}}"
+ ],
+ "description": "Begin - End"
+ },
+ "Figure": {
+ "prefix": "figure",
+ "body": [
+ "\\begin{figure}",
+ "\t\\begin{center}",
+ "\t\t\\includegraphics[width=0.95\\textwidth]{figures/$1}",
+ "\t\\end{center}",
+ "\t\\caption{$3}",
+ "\t\\label{fig:$4}",
+ "\\end{figure}",
+ "$0"
+ ],
+ "description": "Add a figure"
+ },
+ "Figure:ACM": {
+ "prefix": "figure:acm",
+ "body": [
+ "\\begin{figure}",
+ "\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
+ "\t\\caption{$2}",
+ "\t\\label{fig:$3}",
+ "\\end{figure}",
+ "$0"
+ ],
+ "description": "Add a figure (ACM)"
+ },
+ "Figure:ACM:*": {
+ "prefix": "figure:acm:*",
+ "body": [
+ "\\begin{figure*}",
+ "\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
+ "\t\\caption{$2}",
+ "\t\\label{fig:$3}",
+ "\\end{figure*}",
+ "$0"
+ ],
+ "description": "Add a figure (ACM)"
+ },
+ "Table": {
+ "prefix": "table",
+ "body": [
+ "\\begin{table}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{center}",
+ "\t\t\\begin{tabular}[c]{l|l}",
+ "\t\t\t\\hline",
+ "\t\t\t\\multicolumn{1}{c|}{\\textbf{$3}} & ",
+ "\t\t\t\\multicolumn{1}{c}{\\textbf{$4}} \\\\\\\\",
+ "\t\t\t\\hline",
+ "\t\t\ta & b \\\\\\\\",
+ "\t\t\tc & d \\\\\\\\",
+ "\t\t\t$5",
+ "\t\t\t\\hline",
+ "\t\t\\end{tabular}",
+ "\t\\end{center}",
+ "\\end{table}",
+ "$0"
+ ],
+ "description": "Add a table"
+ },
+ "Table:ACM": {
+ "prefix": "table:acm",
+ "body": [
+ "\\begin{table}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{tabular}{${3:ccl}}",
+ "\t\t\\toprule",
+ "\t\t$4",
+ "\t\ta & b & c \\\\\\\\",
+ "\t\t\\midrule",
+ "\t\td & e & f \\\\\\\\",
+ "\t\t\\bottomrule",
+ "\t\\end{tabular}",
+ "\\end{table}",
+ "$0"
+ ],
+ "description": "Add a table (ACM)"
+ },
+ "Table:ACM:*": {
+ "prefix": "table:acm:*",
+ "body": [
+ "\\begin{table*}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{tabular}{${3:ccl}}",
+ "\t\t\\toprule",
+ "\t\t$4",
+ "\t\ta & b & c \\\\\\\\",
+ "\t\t\\midrule",
+ "\t\td & e & f \\\\\\\\",
+ "\t\t\\bottomrule",
+ "\t\\end{tabular}",
+ "\\end{table*}",
+ "$0"
+ ],
+ "description": "Add a table (ACM)"
+ },
+ "Enumerate": {
+ "prefix": "enumerate",
+ "body": [
+ "\\\\begin{enumerate}",
+ "\t\\item $0",
+ "\\\\end{enumerate}"
+ ],
+ "description": "Add a enumerate"
+ },
+ "Compactitem": {
+ "prefix": "compactitem",
+ "body": [
+ "\\begin{compactitem}",
+ "\t\\item $1",
+ "\\end{compactitem}",
+ "$0"
+ ],
+ "description": "Add a compactitem (from package paralist)"
+ },
+ "Cite": {
+ "prefix": "cite",
+ "body": [
+ "~\\cite{$1}$0"
+ ],
+ "description": "Add a cite"
+ },
+ "EmptyPage": {
+ "prefix": "empty",
+ "body": [
+ "\\null\\thispagestyle{empty}",
+ "\\newpage",
+ "$0"
+ ],
+ "description": "Add a empty page"
+ },
+ "Template": {
+ "prefix": ["template", "\\template"],
+ "body": [
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Define Article %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "\\documentclass{article}",
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "",
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Using Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "\\usepackage{geometry}",
+ "\\usepackage{graphicx}",
+ "\\usepackage{amssymb}",
+ "\\usepackage{amsmath}",
+ "\\usepackage{amsthm}",
+ "\\usepackage{empheq}",
+ "\\usepackage{booktabs}",
+ "\\usepackage{color}",
+ "\\usepackage{psfrag}",
+ "\\usepackage{pgfplots}",
+ "\\usepackage{pdfpages}",
+ "\\usepackage{bm}",
+ "\\usepackage{import}",
+ "\\usepackage{transparent}",
+ "\\usepackage{xcolor}",
+ "\\newcommand{incfig}[2][1]{%
+ \def\svgwidth{#1\columnwidth}
+ \import{./figures/}{#2.pdf_tex}}",
+ "\\pdfsuppresswarningpagegroup=1"
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "",
+ "${3:% Other Settings}",
+ "",
+ "%%%%%%%%%%%%%%%%%%%%%%%%%% Page Setting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "",
+ "\\geometry{a4paper}",
+ "",
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Title & Author %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "\\title{${1:Title}}",
+ "\\author{${2:Vito Graffagnino}}",
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+ "",
+ "\\begin{document}",
+ " \\maketitle",
+ " $0",
+ "\\end{document}"
+ ],
+ "description": "Use the default template which includes a variety of packages and declared-commands. The template will also automatically generate the title and author, as well as date, and will formate the document."
+ },
+ "Large Summation": {
+ "prefix": ["sumlarge", "\\sumlarge"],
+ "body": [
+ "\\displaystyle\\sum_{$1}^{$2}$3"
+ ],
+ "description": "Insert a large summation notation."
+ },
+ "Inline Summation": {
+ "prefix": ["suminline", "\\suminline"],
+ "body": [
+ "\\sum_{$1}^{$2}$3"
+ ],
+ "description": "Insert an inline summation notation, (only in the cases when the environment is inline math environment)."
+ },
+ "Inline Math": {
+ "prefix": ["mathinline", "\\mathinline"],
+ "body": [
+ "$ $1 $$0"
+ ],
+ "description": "Insert inline Math Environment."
+ },
+ "Centered Math": {
+ "prefix": ["mathcentered", "\\mathcentered"],
+ "body": [
+ "$$ $0 $$"
+ ],
+ "description": "Insert centered Math Environment."
+ },
+ "Section": {
+ "prefix": ["section", "\\section"],
+ "body": [
+ "\\section{$1}$0"
+ ],
+ "description": "Insert a new section."
+ },
+ "Subsection": {
+ "prefix": ["subsection", "\\subsection"],
+ "body": [
+ "\\subsection{$1}$0"
+ ],
+ "description": "Insert a new subsection."
+ },
+ "Header": {
+ "prefix": ["header", "\\header", "##"],
+ "body": "\\section*{$1}$0",
+ "description": "Insert a section without index."
+ },
+ "Header Small": {
+ "prefix": ["headersmall", "\\headersmall", "###"],
+ "body": "\\subsection*{$1}$0",
+ "description": "Insert a subsection without index."
+ },
+ "Italic Text": {
+ "prefix": ["italic", "\\italic", "*"],
+ "body": "\\textit{$1}$0",
+ "description": "Insert italic text."
+ },
+ "Bold Text": {
+ "prefix": ["bold", "\\bold", "**"],
+ "body": "\\textbf{$1}$0",
+ "description": "Insert bold text."
+ },
+ "Bold Italic Text": {
+ "prefix": ["bolditalic", "\\bolditalic", "***"],
+ "body": "\\textbf{\\textit{$1}}$0",
+ "description": "Insert bold italic text."
+ },
+ "Itemize": {
+ "prefix": ["- ", "\\itemize", "itemize"],
+ "body": [
+ "\\begin{itemize}",
+ "\t\\item $1",
+ "\\end{itemize}$0"
+ ]
+ },
+ "Up": {
+ "prefix": ["to", "\\to"],
+ "body": [
+ "^ {$1}$0"
+ ],
+ "description": "Superscript notation, as well as the power notation."
+ },
+ "Theorem": {
+ "prefix": ["theorem", "\\theorem"],
+ "body": [
+ "\\begin{theorem}[${1:name of the theorem}]",
+ "\t$0",
+ "\\end{theorem}"
+ ],
+ "description": "Insert a theorem, whose style is already defined in the template. The serial number is automatically generated according to the section."
+ },
+ "Problem": {
+ "prefix": ["problem", "\\problem"],
+ "body": [
+ "\\begin{problem}[${1:name of the problem}]",
+ "\t$0",
+ "\\end{problem}"
+ ],
+ "description": "Insert a problem, whose style is already defined in the template. The serial number is automatically generated according to the section."
+ },
+ "Indent": {
+ "prefix": ["tab", "\\tab"],
+ "body": ["\\indent "],
+ "description": "The equivalent of \"\\t\", also known as \"Tab\""
+ },
+ "Definition": {
+ "prefix": ["definition", "\\definition"],
+ "body": [
+ "\\begin{definition}[${1:name of the definition}]",
+ "\t$0",
+ "\\end{definition}"
+ ],
+ "description": "Insert a definition, whose style is already defined in the template. The serial number is automatically generated according to the section."
+ },
+ "Proof": {
+ "prefix": ["proof", "\\proof"],
+ "body": [
+ "\\begin{proof}[Proof ${1:Other Information}]",
+ "\t$0",
+ "\\end{proof}"
+ ],
+ "description": "Insert a proof, whose style is already defined in the template. The serial number is automatically generated according to the section."
+ },
+ "Large Integral": {
+ "prefix": ["integrallarge", "\\integrallarge"],
+ "body": [
+ "\\displaystyle\\int_{$1}^{$2}$3"
+ ],
+ "description": "Insert large integral notation."
+ },
+ "Inline Integral": {
+ "prefix": ["integralinline", "\\integralinline"],
+ "body": [
+ "\\int_{$1}^{$2}$3"
+ ],
+ "description": "Insert inline integral notation, (only in the cases when the environment is inline math environment)."
+ },
+ "Inline Fraction": {
+ "prefix": ["fractioninline", "\\fractioninline"],
+ "body": ["\\frac{$1}{$2}$0"],
+ "description": ["Insert inline fraction notation, (only in the cases when the environment is inline math environment)."]
+ },
+ "Large Fraction": {
+ "prefix": ["fractionlarge", "\\fractionlarge"],
+ "body": ["\\displaystyle\\frac{$1}{$2}$0"],
+ "description": ["Insert large fraction notation"]
+ },
+ "Create 2D Plot environment": {
+ "prefix": ["plotenvironment2d", "\\plotenvironment2d"],
+ "body": [
+ "\\begin{tikzpicture}",
+ "\\begin{axis}[",
+ "legend pos=outer north east,",
+ "title=${1:Example},",
+ "axis lines =${2| box, left, middle, center, right, none|},",
+ "xlabel = \\$x\\$,",
+ "ylabel = \\$y\\$,",
+ "variable = t,",
+ "trig format plots = rad,",
+ "]",
+ "$3",
+ "\\end{axis}",
+ "\\end{tikzpicture}$0"
+ ],
+ "description": "Create a 2DPlot Environment of pgfplots. The style declarations are already included in the snippet."
+ },
+ "Plot 2D Graph": {
+ "prefix": ["plotgraph2d", "\\plotgraph2d"],
+ "body": [
+ "\\addplot [",
+ "\tdomain=${1:-10}:${2:10}," ,
+ "\tsamples=70,",
+ "\tcolor=${3:blue},",
+ "\t]",
+ "\t{${4:x^2 + 2*x + 1}};",
+ "\\addlegendentry{$${5:x^2 + 2x + 1}$}",
+ "$0"
+ ],
+ "description": "Plot a 2D Graph in the 2D graph environment, noted that this can also be used in the 3D environment."
+ },
+ "Plot Circle 2D": {
+ "prefix": ["plotcircle2d", "\\plotcircle2d"],
+ "body": [
+ "\\addplot [",
+ "\tdomain=0:2*3.14159265," ,
+ "\tsamples=70,",
+ "\tcolor=${4:blue},",
+ "\t]",
+ "\t({${1:r}*cos(t)+${2:a}},{${1:r}*sin(t)+${3:b}});",
+ "\\addlegendentry{$(x-${2:a})^2+(y-${3:b})^2=${1:r}^2$}$0"
+ ],
+ "description": "Plot a 2D Circle in the 2D graph environment, noted that this can also be used in the 3D environment."
+ },
+ "Plot Line 2D": {
+ "prefix": ["plotline2d", "\\plotline2d"],
+ "body": [
+ "\\addplot [",
+ "\tdomain=${4:x1}:${5:x2}," ,
+ "\tsamples=70,",
+ "\tcolor=${3:blue},",
+ "\t]",
+ "\t{${1:a}*x+${2:b}};",
+ "\\addlegendentry{$ y=${1:a}x+${2:b}$}$0"
+ ],
+ "description": "Plot a 2D Line in the 2D graph environment, noted that this can also be used in the 3D environment."
+ },
+ "Plot Ellipse 2D": {
+ "prefix": ["plotellipse2d", "\\plotellipse2d"],
+ "body": [
+ "\\addplot [",
+ "\tdomain=0:2*3.14159265," ,
+ "\tsamples=70,",
+ "\tcolor=${5:blue},",
+ "\t]",
+ "\t({${1:a}*cos(t)+${3:x}},{${2:b}*sin(t)+${4:y}});",
+ "\\addlegendentry{$\\frac{(x-${3:x})^2}{${1:a}^2}+\\frac{(y-${4:y})^2}{${2:b}^2}=1$}$0"
+ ],
+ "description": "Plot a 2D Ellipse in the 2D graph environment, noted that this can also be used in the 3D environment."
+ },
+ "Plot Quadratic Function 2D by Point": {
+ "prefix": ["plotquadraticfunction2dbypoint", "\\plotquadraticfunction2dbypoint"],
+ "body": [
+ "\\addplot [",
+ "\tdomain=${4:x1}:${5:x2}," ,
+ "\tsamples=70,",
+ "\tcolor=${6:blue},",
+ "\t]",
+ "\t{${1:a}*(x-${2:m})*(x-${2:m})+${3:b}};",
+ "\\addlegendentry{$ y=${1:a}(x-${2:m})^2+${3:b}$}$0"
+ ],
+ "description": "Plot a 2D graph of a quadratic function in the 2D graph environment by the given extrema, noted that this can also be used in the 3D environment."
+ },
+ "Plot Smooth Curve By Point Set": {
+ "prefix": ["plotsmoothcurvebypointset", "\\plotsmoothcurvebypointset"],
+ "body": [
+ "\\addplot+[smooth]",
+ "coordinates",
+ "{",
+ "${1:seperate the coordinates with spaces}",
+ "};$0"
+ ],
+ "description": "Plot a Smooth Curve by point set (2D)."
+ },
+ "Create 3D Plot Environment": {
+ "prefix": ["plotenvironment3d", "\\plotenvironment3d"],
+ "body": [
+ "\\begin{tikzpicture}",
+ "\\begin{axis}[",
+ "legend pos=outer north east,",
+ "title=${1:Example},",
+ "axis lines =${2| box, left, middle, center, right, none|},",
+ "colormap/${3|hot,hot2,jet,blackwhite,bluered,cool,greenyellow,redyellow,violet|},",
+ "xlabel = \\$x\\$,",
+ "ylabel = \\$y\\$,",
+ "zlabel = \\$z\\$,",
+ "variable = t,",
+ "trig format plots = rad,",
+ "]",
+ "$4",
+ "\\end{axis}",
+ "\\end{tikzpicture}$0"
+ ],
+ "description": "Create a 3DPlot Environment of pgfplots. The style declarations are already included in the snippet."
+ },
+ "Plot 3D Graph": {
+ "prefix": ["plotgraph3d", "\\plotgraph3d"],
+ "body": [
+ "\\addplot3[",
+ "\t${1|surf,mesh|},",
+ "\tsamples=50,",
+ "]",
+ "{${2:x^2+y^2}};",
+ "\\addlegendentry{\\$${3:x}\\$}$0"
+ ],
+ "description": "Plot a 3D Graph in the 3D graph environment created."
+ },
+ "Create Align* Environment in Text": {
+ "prefix": ["aligntext", "\\aligntext"],
+ "body": [
+ "\\begin{align*}",
+ "\t$1",
+ "\\end{align*}$0"
+ ],
+ "description": "Create an align environment when the context is in the text environment."
+ },
+ "Insert Problem Solving Index": {
+ "prefix": ["problemindex", "\\problemindex"],
+ "body": ["\\noindent\\textbf{$1} $0"],
+ "description": "Insert problem solving index format."
+ },
+ "Insert Solution Notation": {
+ "prefix": ["solution", "\\solution"],
+ "body": ["\\textit{ Sol. }"],
+ "description": "Insert italic 'Sol.'"
+ }
+ "Align(ed)": {
+ "prefix": "ali",
+ "body": [
+ "\\begin{align}",
+ "\t$0",
+ "\\end{align}"
+ ],
+ "description": "Align(ed)"
+ },
+ "Cases": {
+ "prefix": "cas",
+ "body": [
+ "\\begin{cases}",
+ "\t${1:equation}, &\\text{ if }${2:case}\\\\\\\\",
+ "\t$0",
+ "\\end{cases}"
+ ],
+ "description": "Cases"
+ },
+ "Chapter": {
+ "prefix": "cha",
+ "body": [
+ "\\chapter{${1:chapter name}} % (fold)",
+ "\\label{cha:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% chapter $2 (end)"
+ ],
+ "description": "Chapter"
+ },
+ "Description": {
+ "prefix": "desc",
+ "body": [
+ "\\\\begin{description}",
+ "\t\\item[$1] $0",
+ "\\\\end{description}"
+ ],
+ "description": "Description"
+ },
+ "Math": {
+ "prefix": "math",
+ "body": [
+ "\\begin{math}",
+ "\t$1",
+ "\\end{math}",
+ "$0"
+ ],
+ "description": "Add a Math"
+ },
+ "DisplayMath": {
+ "prefix": "displaymath",
+ "body": [
+ "\\begin{displaymath}",
+ "\t$1",
+ "\\end{displaymath}",
+ "$0"
+ ],
+ "description": "Display Math"
+ },
+ "Equation": {
+ "prefix": "equation",
+ "body": [
+ "\\begin{equation}",
+ "\t$0",
+ "\t\\label{eq:$1}",
+ "\\end{equation}"
+ ],
+ "description": "Add a Equation"
+ },
+ "Display Math — \\[ … \\]": {
+ "prefix": "$$",
+ "body": [
+ "\\[",
+ "\t$TM_SELECTED_TEXT$1",
+ "\\]"
+ ],
+ "description": "Display Math"
+ },
+ "Theorem": {
+ "prefix": "theorem",
+ "body": [
+ "\\begin{theorem}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{theorem}",
+ "$0"
+ ],
+ "description": "Add a theorem"
+ },
+ "Definition": {
+ "prefix": "definition",
+ "body": [
+ "\\begin{definition}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{definition}",
+ "$0"
+ ],
+ "description": "Add a definition"
+ },
+ "Proof": {
+ "prefix": "proof",
+ "body": [
+ "\\begin{proof}",
+ "\t$1",
+ "\t\\begin{displaymath}",
+ "\t\t$2",
+ "\t\\end{displaymath}",
+ "\t$3",
+ "\\end{proof}",
+ "$0"
+ ],
+ "description": "Add a proof"
+ },
+ "Algorithm": {
+ "prefix": "algo",
+ "body": [
+ "% \\usepackage{algorithm,algorithmicx,algpseudocode}",
+ "\\begin{algorithm}",
+ "\t\\floatname{algorithm}{${1:Algorithm}}",
+ "\t\\algrenewcommand\\algorithmicrequire{\\textbf{${2:Input: }}}",
+ "\t\\algrenewcommand\\algorithmicensure{\\textbf{${3:Output: }}}",
+ "\t\\caption{$4}",
+ "\t\\label{alg:$5}",
+ "\t\\begin{algorithmic}[1]",
+ "\t\t\\Require \\$input\\$",
+ "\t\t\\Ensure \\$output\\$",
+ "\t\t$6",
+ "\t\t\\State \\textbf{return} \\$state\\$",
+ "\t\\end{algorithmic}",
+ "\\end{algorithm}",
+ "$0"
+ ],
+ "description": "Add an algorithm"
+ },
+ "Algorithm:State": {
+ "prefix": "state",
+ "body": [
+ "\\State $1"
+ ],
+ "desciption": "Add an statement of algorithm"
+ },
+ "Algorithm:If": {
+ "prefix": "if",
+ "body": [
+ "\\If{$1}",
+ "\\ElsIf{$2}",
+ "\\Else",
+ "\\EndIf"
+ ],
+ "desciption": "Add an if statement of algorithm"
+ },
+ "Algorithm:For": {
+ "prefix": "for",
+ "body": [
+ "\\For{i=0:$1}",
+ "\t\\State $0",
+ "\\EndFor"
+ ],
+ "desciption": "Add an for statement of algorithm"
+ },
+ "Algorithm:While": {
+ "prefix": "while",
+ "body": [
+ "\\While{$1}",
+ "\t\\State $0",
+ "\\EndWhile"
+ ],
+ "desciption": "Add an for statement of algorithm"
+ },
+ "Algorithm:Ref": {
+ "prefix": "algo:ref",
+ "body": [
+ "${1:Algorithm}~\\ref{algo:$2}$0"
+ ],
+ "desciption": "Ref for Algorithm"
+ },
+ "Figure:Ref": {
+ "prefix": "figure:ref",
+ "body": [
+ "${1:Figure}~\\ref{fig:$2}$0"
+ ],
+ "description": "Ref for Figure"
+ },
+ "Gather(ed)": {
+ "prefix": "gat",
+ "body": [
+ "\\begin{gather}",
+ "\t$0",
+ "\\end{gather}"
+ ],
+ "description": "Gather(ed)"
+ },
+ "Itemize": {
+ "prefix": "item",
+ "body": [
+ "\\\\begin{itemize}",
+ "\t\\item $0",
+ "\\\\end{itemize}"
+ ],
+ "description": "Itemize"
+ },
+ "Listing:Ref": {
+ "prefix": "listing:ref",
+ "body": [
+ "${1:Listing}~\\ref{lst:$2}$0"
+ ],
+ "description": "Listing"
+ },
+ "Matrix": {
+ "prefix": "mat",
+ "body": [
+ "\\begin{${1:p/b/v/V/B/small}matrix}",
+ "\t$0",
+ "\\end{${1:p/b/v/V/B/small}matrix}"
+ ],
+ "description": "Matrix"
+ },
+ "Page": {
+ "prefix": "page",
+ "body": [
+ "${1:page}~\\pageref{$2}$0"
+ ],
+ "description": "Page"
+ },
+ "Paragraph": {
+ "prefix": "par",
+ "body": [
+ "\\paragraph{${1:paragraph name}} % (fold)",
+ "\\label{par:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% paragraph $2 (end)"
+ ],
+ "description": "Paragraph"
+ },
+ "Part": {
+ "prefix": "part",
+ "body": [
+ "\\part{${1:part name}} % (fold)",
+ "\\label{prt:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% part $2 (end)"
+ ],
+ "description": "Part"
+ },
+ "Region Start": {
+ "prefix": "#region",
+ "body": [
+ "%#Region $0"
+ ],
+ "description": "Folding Region Start"
+ },
+ "Region End": {
+ "prefix": "#endregion",
+ "body": [
+ "%#Endregion"
+ ],
+ "description": "Folding Region End"
+ },
+ "Section:Ref": {
+ "prefix": "section:ref",
+ "body": [
+ "${1:Section}~\\ref{sec:$2}$0"
+ ],
+ "description": "Section Reference"
+ },
+ "Split": {
+ "prefix": "spl",
+ "body": [
+ "\\begin{split}",
+ "\t$0",
+ "\\end{split}"
+ ],
+ "description": "Split"
+ },
+ "Section": {
+ "prefix": "sec",
+ "body": [
+ "\\section{${1:section name}} % (fold)",
+ "\\label{sec:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% section $2 (end)"
+ ],
+ "description": "Section"
+ },
+ "Sub Paragraph": {
+ "prefix": "subp",
+ "body": [
+ "\\subparagraph{${1:subparagraph name}} % (fold)",
+ "\\label{subp:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subparagraph $2 (end)"
+ ],
+ "description": "Sub Paragraph"
+ },
+ "Sub Section": {
+ "prefix": "sub",
+ "body": [
+ "\\subsection{${1:subsection name}} % (fold)",
+ "\\label{sub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subsection $2 (end)"
+ ],
+ "description": "Sub Section"
+ },
+ "Sub Sub Section": {
+ "prefix": "subs",
+ "body": [
+ "\\subsubsection{${1:subsubsection name}} % (fold)",
+ "\\label{ssub:${2:${1/(\\w+)(\\W+$)?|\\W+/${1:?${1:/asciify/downcase}:_}/g}}}",
+ "${0:$TM_SELECTED_TEXT}",
+ "% subsubsection $2 (end)"
+ ],
+ "description": "Sub Sub Section"
+ },
+ "Table:Ref": {
+ "prefix": "table:ref",
+ "body": [
+ "${1:Table}~\\ref{tab:$2}$0"
+ ],
+ "description": "Table Reference"
+ },
+ "Tabular": {
+ "prefix": "tab",
+ "body": [
+ "\\\\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}",
+ "$0${2/((?<=[clr])([ |]*(c|l|r)))|./(?1: & )/g}",
+ "\\\\end{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}"
+ ],
+ "description": "Tabular"
+ },
+ "\\begin{}…\\end{}": {
+ "prefix": "begin",
+ "body": [
+ "\\\\begin{${1:env}}",
+ "\t${1/(enumerate|itemize|list)|(description)|.*/(?1:\\item )(?2:\\item)/}$0",
+ "\\\\end{${1:env}}"
+ ],
+ "description": "Begin - End"
+ },
+ "Figure": {
+ "prefix": "figure",
+ "body": [
+ "\\begin{figure}",
+ "\t\\begin{center}",
+ "\t\t\\includegraphics[width=0.95\\textwidth]{figures/$1}",
+ "\t\\end{center}",
+ "\t\\caption{$3}",
+ "\t\\label{fig:$4}",
+ "\\end{figure}",
+ "$0"
+ ],
+ "description": "Add a figure"
+ },
+ "Figure:ACM": {
+ "prefix": "figure:acm",
+ "body": [
+ "\\begin{figure}",
+ "\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
+ "\t\\caption{$2}",
+ "\t\\label{fig:$3}",
+ "\\end{figure}",
+ "$0"
+ ],
+ "description": "Add a figure (ACM)"
+ },
+ "Figure:ACM:*": {
+ "prefix": "figure:acm:*",
+ "body": [
+ "\\begin{figure*}",
+ "\t\\includegraphics[width=0.45\\textwidth]{figures/$1}",
+ "\t\\caption{$2}",
+ "\t\\label{fig:$3}",
+ "\\end{figure*}",
+ "$0"
+ ],
+ "description": "Add a figure (ACM)"
+ },
+ "Table": {
+ "prefix": "table",
+ "body": [
+ "\\begin{table}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{center}",
+ "\t\t\\begin{tabular}[c]{l|l}",
+ "\t\t\t\\hline",
+ "\t\t\t\\multicolumn{1}{c|}{\\textbf{$3}} & ",
+ "\t\t\t\\multicolumn{1}{c}{\\textbf{$4}} \\\\\\\\",
+ "\t\t\t\\hline",
+ "\t\t\ta & b \\\\\\\\",
+ "\t\t\tc & d \\\\\\\\",
+ "\t\t\t$5",
+ "\t\t\t\\hline",
+ "\t\t\\end{tabular}",
+ "\t\\end{center}",
+ "\\end{table}",
+ "$0"
+ ],
+ "description": "Add a table"
+ },
+ "Table:ACM": {
+ "prefix": "table:acm",
+ "body": [
+ "\\begin{table}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{tabular}{${3:ccl}}",
+ "\t\t\\toprule",
+ "\t\t$4",
+ "\t\ta & b & c \\\\\\\\",
+ "\t\t\\midrule",
+ "\t\td & e & f \\\\\\\\",
+ "\t\t\\bottomrule",
+ "\t\\end{tabular}",
+ "\\end{table}",
+ "$0"
+ ],
+ "description": "Add a table (ACM)"
+ },
+ "Table:ACM:*": {
+ "prefix": "table:acm:*",
+ "body": [
+ "\\begin{table*}",
+ "\t\\caption{$1}",
+ "\t\\label{tab:$2}",
+ "\t\\begin{tabular}{${3:ccl}}",
+ "\t\t\\toprule",
+ "\t\t$4",
+ "\t\ta & b & c \\\\\\\\",
+ "\t\t\\midrule",
+ "\t\td & e & f \\\\\\\\",
+ "\t\t\\bottomrule",
+ "\t\\end{tabular}",
+ "\\end{table*}",
+ "$0"
+ ],
+ "description": "Add a table (ACM)"
+ },
+ "Enumerate": {
+ "prefix": "enumerate",
+ "body": [
+ "\\\\begin{enumerate}",
+ "\t\\item $0",
+ "\\\\end{enumerate}"
+ ],
+ "description": "Add a enumerate"
+ },
+ "Compactitem": {
+ "prefix": "compactitem",
+ "body": [
+ "\\begin{compactitem}",
+ "\t\\item $1",
+ "\\end{compactitem}",
+ "$0"
+ ],
+ "description": "Add a compactitem (from package paralist)"
+ },
+ "Cite": {
+ "prefix": "cite",
+ "body": [
+ "~\\cite{$1}$0"
+ ],
+ "description": "Add a cite"
+ },
+ "EmptyPage": {
+ "prefix": "empty",
+ "body": [
+ "\\null\\thispagestyle{empty}",
+ "\\newpage",
+ "$0"
+ ],
+ "description": "Add a empty page"
+ }
}