mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 06:33:35 +08:00 
			
		
		
		
	Forgot to check in the rest of the updated plugins :/
This commit is contained in:
		| @ -3,12 +3,15 @@ | |||||||
|  |  | ||||||
| call ale#Set('proto_buf_lint_executable', 'buf') | call ale#Set('proto_buf_lint_executable', 'buf') | ||||||
| call ale#Set('proto_buf_lint_config', '') | call ale#Set('proto_buf_lint_config', '') | ||||||
|  | call ale#Set('proto_buf_lint_options', '') | ||||||
|  |  | ||||||
| function! ale_linters#proto#buf_lint#GetCommand(buffer) abort | function! ale_linters#proto#buf_lint#GetCommand(buffer) abort | ||||||
|     let l:config = ale#Var(a:buffer, 'proto_buf_lint_config') |     let l:config = ale#Var(a:buffer, 'proto_buf_lint_config') | ||||||
|  |     let l:options = ale#Var(a:buffer, 'proto_buf_lint_options') | ||||||
|  |  | ||||||
|     return '%e lint' |     return '%e lint' | ||||||
|     \ . (!empty(l:config) ? ' --config=' . ale#Escape(l:config) : '') |     \ . (!empty(l:config) ? ' --config=' . ale#Escape(l:config) : '') | ||||||
|  |     \ . (!empty(l:options) ? ' ' . l:options : '') | ||||||
|     \ . ' %s#include_package_files=true' |     \ . ' %s#include_package_files=true' | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| @ -19,5 +22,5 @@ call ale#linter#Define('proto', { | |||||||
| \   'output_stream': 'stdout', | \   'output_stream': 'stdout', | ||||||
| \   'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')}, | \   'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')}, | ||||||
| \   'command': function('ale_linters#proto#buf_lint#GetCommand'), | \   'command': function('ale_linters#proto#buf_lint#GetCommand'), | ||||||
| \   'callback': 'ale#handlers#unix#HandleAsError', | \   'callback': 'ale#handlers#go#Handler', | ||||||
| \}) | \}) | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ | |||||||
| " Description: Volar Language Server integration for ALE adopted from | " Description: Volar Language Server integration for ALE adopted from | ||||||
| "              nvim-lspconfig and volar/packages/shared/src/types.ts | "              nvim-lspconfig and volar/packages/shared/src/types.ts | ||||||
|  |  | ||||||
| call ale#Set('vue_volar_executable', 'volar-server') | call ale#Set('vue_volar_executable', 'vue-language-server') | ||||||
| call ale#Set('vue_volar_use_global', get(g:, 'ale_use_global_executables', 0)) | call ale#Set('vue_volar_use_global', get(g:, 'ale_use_global_executables', 0)) | ||||||
| call ale#Set('vue_volar_init_options', { | call ale#Set('vue_volar_init_options', { | ||||||
| \   'documentFeatures': { | \   'documentFeatures': { | ||||||
| @ -73,7 +73,7 @@ call ale#linter#Define('vue', { | |||||||
| \   'name': 'volar', | \   'name': 'volar', | ||||||
| \   'language': 'vue', | \   'language': 'vue', | ||||||
| \   'lsp': 'stdio', | \   'lsp': 'stdio', | ||||||
| \   'executable': {b -> ale#path#FindExecutable(b, 'vue_volar', ['node_modules/.bin/volar-server'])}, | \   'executable': {b -> ale#path#FindExecutable(b, 'vue_volar', ['node_modules/.bin/vue-language-server'])}, | ||||||
| \   'command': '%e --stdio', | \   'command': '%e --stdio', | ||||||
| \   'project_root': function('ale_linters#vue#volar#GetProjectRoot'), | \   'project_root': function('ale_linters#vue#volar#GetProjectRoot'), | ||||||
| \   'initialization_options': function('ale_linters#vue#volar#GetInitializationOptions'), | \   'initialization_options': function('ale_linters#vue#volar#GetInitializationOptions'), | ||||||
|  | |||||||
| @ -139,7 +139,7 @@ let s:should_complete_map = { | |||||||
| " Regular expressions for finding the start column to replace with completion. | " Regular expressions for finding the start column to replace with completion. | ||||||
| let s:omni_start_map = { | let s:omni_start_map = { | ||||||
| \   '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', | \   '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$', | ||||||
| \   'racket': '\k\+', | \   'racket': '\k\+$', | ||||||
| \} | \} | ||||||
|  |  | ||||||
| " A map of exact characters for triggering LSP completions. Do not forget to | " A map of exact characters for triggering LSP completions. Do not forget to | ||||||
|  | |||||||
| @ -203,6 +203,10 @@ function! ale#engine#SetResults(buffer, loclist) abort | |||||||
|         call ale#highlight#SetHighlights(a:buffer, a:loclist) |         call ale#highlight#SetHighlights(a:buffer, a:loclist) | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|  |     if g:ale_virtualtext_cursor == 2 | ||||||
|  |         call ale#virtualtext#SetTexts(a:buffer, a:loclist) | ||||||
|  |     endif | ||||||
|  |  | ||||||
|     if l:linting_is_done |     if l:linting_is_done | ||||||
|         if g:ale_echo_cursor |         if g:ale_echo_cursor | ||||||
|             " Try and echo the warning now. |             " Try and echo the warning now. | ||||||
| @ -210,7 +214,7 @@ function! ale#engine#SetResults(buffer, loclist) abort | |||||||
|             call ale#cursor#EchoCursorWarning() |             call ale#cursor#EchoCursorWarning() | ||||||
|         endif |         endif | ||||||
|  |  | ||||||
|         if g:ale_virtualtext_cursor |         if g:ale_virtualtext_cursor == 1 | ||||||
|             " Try and show the warning now. |             " Try and show the warning now. | ||||||
|             " This will only do something meaningful if we're in normal mode. |             " This will only do something meaningful if we're in normal mode. | ||||||
|             call ale#virtualtext#ShowCursorWarning() |             call ale#virtualtext#ShowCursorWarning() | ||||||
|  | |||||||
| @ -139,7 +139,7 @@ function! ale#events#Init() abort | |||||||
|                 autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif |                 autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif | ||||||
|             endif |             endif | ||||||
|  |  | ||||||
|             if g:ale_virtualtext_cursor |             if g:ale_virtualtext_cursor == 1 | ||||||
|                 autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarningWithDelay() | endif |                 autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarningWithDelay() | endif | ||||||
|                 " Look for a warning to echo as soon as we leave Insert mode. |                 " Look for a warning to echo as soon as we leave Insert mode. | ||||||
|                 " The script's position variable used when moving the cursor will |                 " The script's position variable used when moving the cursor will | ||||||
|  | |||||||
| @ -221,6 +221,11 @@ let s:default_registry = { | |||||||
| \       'suggested_filetypes': ['swift'], | \       'suggested_filetypes': ['swift'], | ||||||
| \       'description': 'Apply SwiftFormat to a file.', | \       'description': 'Apply SwiftFormat to a file.', | ||||||
| \   }, | \   }, | ||||||
|  | \   'syntax_tree': { | ||||||
|  | \       'function': 'ale#fixers#syntax_tree#Fix', | ||||||
|  | \       'suggested_filetypes': ['ruby'], | ||||||
|  | \       'description': 'Fix ruby files with stree write', | ||||||
|  | \   }, | ||||||
| \   'apple-swift-format': { | \   'apple-swift-format': { | ||||||
| \       'function': 'ale#fixers#appleswiftformat#Fix', | \       'function': 'ale#fixers#appleswiftformat#Fix', | ||||||
| \       'suggested_filetypes': ['swift'], | \       'suggested_filetypes': ['swift'], | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| " Author: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch> | " Author: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch> | ||||||
| " Author: Kevin Clark <kevin.clark@gmail.com> | " Author: Kevin Clark <kevin.clark@gmail.com> | ||||||
| " Author: D. Ben Knoble <ben.knoble+github@gmail.com> | " Author: D. Ben Knoble <ben.knoble+github@gmail.com> | ||||||
|  | " Author: Shaun Duncan <shaun.duncan@gmail.com> | ||||||
| " Description: Floating preview window for showing whatever information in. | " Description: Floating preview window for showing whatever information in. | ||||||
|  |  | ||||||
| " Precondition: exists('*nvim_open_win') || has('popupwin') | " Precondition: exists('*nvim_open_win') || has('popupwin') | ||||||
| @ -133,15 +134,18 @@ function! s:NvimPrepareWindowContent(lines) abort | |||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:NvimCreate(options) abort | function! s:NvimCreate(options) abort | ||||||
|     let l:buffer = nvim_create_buf(v:false, v:false) |     let l:popup_opts = extend({ | ||||||
|     let l:winid = nvim_open_win(l:buffer, v:false, { |  | ||||||
|     \    'relative': 'cursor', |     \    'relative': 'cursor', | ||||||
|     \    'row': 1, |     \    'row': 1, | ||||||
|     \    'col': 0, |     \    'col': 0, | ||||||
|     \    'width': 42, |     \    'width': 42, | ||||||
|     \    'height': 4, |     \    'height': 4, | ||||||
|     \    'style': 'minimal' |     \    'style': 'minimal' | ||||||
|     \ }) |     \ }, s:GetPopupOpts()) | ||||||
|  |  | ||||||
|  |     let l:buffer = nvim_create_buf(v:false, v:false) | ||||||
|  |     let l:winid = nvim_open_win(l:buffer, v:false, l:popup_opts) | ||||||
|  |  | ||||||
|     call nvim_buf_set_option(l:buffer, 'buftype', 'acwrite') |     call nvim_buf_set_option(l:buffer, 'buftype', 'acwrite') | ||||||
|     call nvim_buf_set_option(l:buffer, 'bufhidden', 'delete') |     call nvim_buf_set_option(l:buffer, 'bufhidden', 'delete') | ||||||
|     call nvim_buf_set_option(l:buffer, 'swapfile', v:false) |     call nvim_buf_set_option(l:buffer, 'swapfile', v:false) | ||||||
| @ -151,7 +155,8 @@ function! s:NvimCreate(options) abort | |||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:VimCreate(options) abort | function! s:VimCreate(options) abort | ||||||
|     let l:popup_id = popup_create([], { |     " default options | ||||||
|  |     let l:popup_opts = extend({ | ||||||
|     \    'line': 'cursor+1', |     \    'line': 'cursor+1', | ||||||
|     \    'col': 'cursor', |     \    'col': 'cursor', | ||||||
|     \    'drag': v:true, |     \    'drag': v:true, | ||||||
| @ -170,7 +175,9 @@ function! s:VimCreate(options) abort | |||||||
|     \        get(g:ale_floating_window_border, 5, '+'), |     \        get(g:ale_floating_window_border, 5, '+'), | ||||||
|     \    ], |     \    ], | ||||||
|     \    'moved': 'any', |     \    'moved': 'any', | ||||||
|     \    }) |     \ }, s:GetPopupOpts()) | ||||||
|  |  | ||||||
|  |     let l:popup_id = popup_create([], l:popup_opts) | ||||||
|     call setbufvar(winbufnr(l:popup_id), '&filetype', get(a:options, 'filetype', 'ale-preview')) |     call setbufvar(winbufnr(l:popup_id), '&filetype', get(a:options, 'filetype', 'ale-preview')) | ||||||
|     let w:preview = {'id': l:popup_id} |     let w:preview = {'id': l:popup_id} | ||||||
| endfunction | endfunction | ||||||
| @ -204,3 +211,21 @@ function! s:VimClose() abort | |||||||
|     call popup_close(w:preview['id']) |     call popup_close(w:preview['id']) | ||||||
|     unlet w:preview |     unlet w:preview | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
|  | " get either the results of a function callback or dictionary for popup overrides | ||||||
|  | function! s:GetPopupOpts() abort | ||||||
|  |     if exists('g:ale_floating_preview_popup_opts') | ||||||
|  |         let l:ref = g:ale_floating_preview_popup_opts | ||||||
|  |  | ||||||
|  |         if type(l:ref) is# v:t_dict | ||||||
|  |             return l:ref | ||||||
|  |         elseif type(l:ref) is# v:t_string | ||||||
|  |             try | ||||||
|  |                 return function(l:ref)() | ||||||
|  |             catch /E700/ | ||||||
|  |             endtry | ||||||
|  |         endif | ||||||
|  |     endif | ||||||
|  |  | ||||||
|  |     return {} | ||||||
|  | endfunction | ||||||
|  | |||||||
| @ -29,6 +29,8 @@ function! ale#handlers#deno#GetProjectRoot(buffer) abort | |||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     let l:possible_project_roots = [ |     let l:possible_project_roots = [ | ||||||
|  |     \   'deno.json', | ||||||
|  |     \   'deno.jsonc', | ||||||
|     \   'tsconfig.json', |     \   'tsconfig.json', | ||||||
|     \   '.git', |     \   '.git', | ||||||
|     \   bufname(a:buffer), |     \   bufname(a:buffer), | ||||||
|  | |||||||
| @ -339,6 +339,10 @@ function! ale#hover#ShowTruncatedMessageAtCursor() abort | |||||||
|     let l:buffer = bufnr('') |     let l:buffer = bufnr('') | ||||||
|     let l:pos = getpos('.')[0:2] |     let l:pos = getpos('.')[0:2] | ||||||
|  |  | ||||||
|  |     if !getbufvar(l:buffer, 'ale_enabled', 1) | ||||||
|  |         return | ||||||
|  |     endif | ||||||
|  |  | ||||||
|     if l:pos != s:last_pos |     if l:pos != s:last_pos | ||||||
|         let s:last_pos = l:pos |         let s:last_pos = l:pos | ||||||
|         let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) |         let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) | ||||||
|  | |||||||
| @ -141,6 +141,10 @@ function! s:HandleLSPErrorMessage(linter_name, response) abort | |||||||
|         return |         return | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|  |     call ale#lsp_linter#AddErrorMessage(a:linter_name, l:message) | ||||||
|  | endfunction | ||||||
|  |  | ||||||
|  | function! ale#lsp_linter#AddErrorMessage(linter_name, message) abort | ||||||
|     " This global variable is set here so we don't load the debugging.vim file |     " This global variable is set here so we don't load the debugging.vim file | ||||||
|     " until someone uses :ALEInfo. |     " until someone uses :ALEInfo. | ||||||
|     let g:ale_lsp_error_messages = get(g:, 'ale_lsp_error_messages', {}) |     let g:ale_lsp_error_messages = get(g:, 'ale_lsp_error_messages', {}) | ||||||
| @ -149,7 +153,7 @@ function! s:HandleLSPErrorMessage(linter_name, response) abort | |||||||
|         let g:ale_lsp_error_messages[a:linter_name] = [] |         let g:ale_lsp_error_messages[a:linter_name] = [] | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     call add(g:ale_lsp_error_messages[a:linter_name], l:message) |     call add(g:ale_lsp_error_messages[a:linter_name], a:message) | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort | function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort | ||||||
| @ -430,6 +434,8 @@ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort | |||||||
|     if empty(l:root) && a:linter.lsp isnot# 'tsserver' |     if empty(l:root) && a:linter.lsp isnot# 'tsserver' | ||||||
|         " If there's no project root, then we can't check files with LSP, |         " If there's no project root, then we can't check files with LSP, | ||||||
|         " unless we are using tsserver, which doesn't use project roots. |         " unless we are using tsserver, which doesn't use project roots. | ||||||
|  |         call ale#lsp_linter#AddErrorMessage(a:linter.name, "Failed to find project root, language server wont't start.") | ||||||
|  |  | ||||||
|         return 0 |         return 0 | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|  | |||||||
| @ -14,8 +14,8 @@ function! s:DisablePostamble() abort | |||||||
|         call ale#highlight#UpdateHighlights() |         call ale#highlight#UpdateHighlights() | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     if g:ale_virtualtext_cursor |     if g:ale_virtualtext_cursor == 1 | ||||||
|         call ale#virtualtext#Clear() |         call ale#virtualtext#Clear(bufnr('')) | ||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
|  | |||||||
| @ -8,52 +8,59 @@ let g:ale_virtualtext_delay = get(g:, 'ale_virtualtext_delay', 10) | |||||||
| let s:cursor_timer = -1 | let s:cursor_timer = -1 | ||||||
| let s:last_pos = [0, 0, 0] | let s:last_pos = [0, 0, 0] | ||||||
| let s:has_virt_text = 0 | let s:has_virt_text = 0 | ||||||
|  | let s:emulate_virt = 0 | ||||||
|  |  | ||||||
| if has('nvim-0.3.2') | if has('nvim-0.3.2') | ||||||
|     let s:ns_id = nvim_create_namespace('ale') |     let s:ns_id = nvim_create_namespace('ale') | ||||||
|     let s:has_virt_text = 1 |     let s:has_virt_text = 1 | ||||||
| elseif has('textprop') && has('popupwin') | elseif has('textprop') && has('popupwin') | ||||||
|     call prop_type_add('ale', {}) |  | ||||||
|     let s:last_popup = -1 |  | ||||||
|     let s:has_virt_text = 1 |     let s:has_virt_text = 1 | ||||||
|  |     let s:emulate_virt = !has('patch-9.0.0297') | ||||||
|  |     let s:hl_list = [] | ||||||
|  |  | ||||||
|  |     if s:emulate_virt | ||||||
|  |         call prop_type_add('ale', {}) | ||||||
|  |         let s:last_virt = -1 | ||||||
|  |     endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
| function! ale#virtualtext#Clear() abort | function! ale#virtualtext#Clear(buf) abort | ||||||
|     if !s:has_virt_text |     if !s:has_virt_text | ||||||
|         return |         return | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     let l:buffer = bufnr('') |  | ||||||
|  |  | ||||||
|     if has('nvim') |     if has('nvim') | ||||||
|         call nvim_buf_clear_highlight(l:buffer, s:ns_id, 0, -1) |         call nvim_buf_clear_namespace(a:buf, s:ns_id, 0, -1) | ||||||
|     else |     else | ||||||
|         if s:last_popup != -1 |         if s:emulate_virt && s:last_virt != -1 | ||||||
|             call prop_remove({'type': 'ale'}) |             call prop_remove({'type': 'ale'}) | ||||||
|             call popup_close(s:last_popup) |             call popup_close(s:last_virt) | ||||||
|             let s:last_popup = -1 |             let s:last_virt = -1 | ||||||
|  |         elseif !empty(s:hl_list) | ||||||
|  |             call prop_remove({ | ||||||
|  |             \ 'types': s:hl_list, | ||||||
|  |             \ 'all': 1, | ||||||
|  |             \ 'bufnr': a:buf}) | ||||||
|         endif |         endif | ||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! ale#virtualtext#ShowMessage(message, hl_group) abort | function! ale#virtualtext#ShowMessage(message, hl_group, buf, line) abort | ||||||
|     if !s:has_virt_text |     if !s:has_virt_text || !bufexists(str2nr(a:buf)) | ||||||
|         return |         return | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
|     let l:line = line('.') |  | ||||||
|     let l:buffer = bufnr('') |  | ||||||
|     let l:prefix = get(g:, 'ale_virtualtext_prefix', '> ') |     let l:prefix = get(g:, 'ale_virtualtext_prefix', '> ') | ||||||
|     let l:msg = l:prefix.trim(substitute(a:message, '\n', ' ', 'g')) |     let l:msg = l:prefix.trim(substitute(a:message, '\n', ' ', 'g')) | ||||||
|  |  | ||||||
|     if has('nvim') |     if has('nvim') | ||||||
|         call nvim_buf_set_virtual_text(l:buffer, s:ns_id, l:line-1, [[l:msg, a:hl_group]], {}) |         call nvim_buf_set_virtual_text(a:buf, s:ns_id, a:line-1, [[l:msg, a:hl_group]], {}) | ||||||
|     else |     elseif s:emulate_virt | ||||||
|         let l:left_pad = col('$') |         let l:left_pad = col('$') | ||||||
|         call prop_add(l:line, l:left_pad, { |         call prop_add(a:line, l:left_pad, { | ||||||
|         \ 'type': 'ale', |         \ 'type': 'ale', | ||||||
|         \}) |         \}) | ||||||
|         let s:last_popup = popup_create(l:msg, { |         let s:last_virt = popup_create(l:msg, { | ||||||
|         \ 'line': -1, |         \ 'line': -1, | ||||||
|         \ 'padding': [0, 0, 0, 1], |         \ 'padding': [0, 0, 0, 1], | ||||||
|         \ 'mask': [[1, 1, 1, 1]], |         \ 'mask': [[1, 1, 1, 1]], | ||||||
| @ -63,6 +70,19 @@ function! ale#virtualtext#ShowMessage(message, hl_group) abort | |||||||
|         \ 'wrap': 0, |         \ 'wrap': 0, | ||||||
|         \ 'zindex': 2 |         \ 'zindex': 2 | ||||||
|         \}) |         \}) | ||||||
|  |     else | ||||||
|  |         let type = prop_type_get(a:hl_group) | ||||||
|  |  | ||||||
|  |         if type == {} | ||||||
|  |             call add(s:hl_list, a:hl_group) | ||||||
|  |             call prop_type_add(a:hl_group, {'highlight': a:hl_group}) | ||||||
|  |         endif | ||||||
|  |  | ||||||
|  |         call prop_add(a:line, 0, { | ||||||
|  |         \ 'type': a:hl_group, | ||||||
|  |         \ 'text': ' ' . l:msg, | ||||||
|  |         \ 'bufnr': a:buf | ||||||
|  |         \}) | ||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| @ -73,8 +93,26 @@ function! s:StopCursorTimer() abort | |||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
|  | function! ale#virtualtext#GetHlGroup(type, style) abort | ||||||
|  |     if a:type is# 'E' | ||||||
|  |         if a:style is# 'style' | ||||||
|  |             return 'ALEVirtualTextStyleError' | ||||||
|  |         else | ||||||
|  |             return 'ALEVirtualTextError' | ||||||
|  |         endif | ||||||
|  |     elseif a:type is# 'W' | ||||||
|  |         if a:style is# 'style' | ||||||
|  |             return 'ALEVirtualTextStyleWarning' | ||||||
|  |         else | ||||||
|  |             return 'ALEVirtualTextWarning' | ||||||
|  |         endif | ||||||
|  |     else | ||||||
|  |         return 'ALEVirtualTextInfo' | ||||||
|  |     endif | ||||||
|  | endfunction | ||||||
|  |  | ||||||
| function! ale#virtualtext#ShowCursorWarning(...) abort | function! ale#virtualtext#ShowCursorWarning(...) abort | ||||||
|     if !g:ale_virtualtext_cursor |     if g:ale_virtualtext_cursor != 1 | ||||||
|         return |         return | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
| @ -90,35 +128,21 @@ function! ale#virtualtext#ShowCursorWarning(...) abort | |||||||
|  |  | ||||||
|     let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) |     let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer) | ||||||
|  |  | ||||||
|     call ale#virtualtext#Clear() |     call ale#virtualtext#Clear(l:buffer) | ||||||
|  |  | ||||||
|     if !empty(l:loc) |     if !empty(l:loc) | ||||||
|         let l:msg = l:loc.text |         let l:msg = l:loc.text | ||||||
|         let l:hl_group = 'ALEVirtualTextInfo' |  | ||||||
|         let l:type = get(l:loc, 'type', 'E') |         let l:type = get(l:loc, 'type', 'E') | ||||||
|  |         let l:style = get(l:loc, 'sub_type', '') | ||||||
|         if l:type is# 'E' |         let l:hl_group = ale#virtualtext#GetHlGroup(l:type, l:style) | ||||||
|             if get(l:loc, 'sub_type', '') is# 'style' |         call ale#virtualtext#ShowMessage(l:msg, l:hl_group, l:buffer, line('.')) | ||||||
|                 let l:hl_group = 'ALEVirtualTextStyleError' |  | ||||||
|             else |  | ||||||
|                 let l:hl_group = 'ALEVirtualTextError' |  | ||||||
|             endif |  | ||||||
|         elseif l:type is# 'W' |  | ||||||
|             if get(l:loc, 'sub_type', '') is# 'style' |  | ||||||
|                 let l:hl_group = 'ALEVirtualTextStyleWarning' |  | ||||||
|             else |  | ||||||
|                 let l:hl_group = 'ALEVirtualTextWarning' |  | ||||||
|             endif |  | ||||||
|         endif |  | ||||||
|  |  | ||||||
|         call ale#virtualtext#ShowMessage(l:msg, l:hl_group) |  | ||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! ale#virtualtext#ShowCursorWarningWithDelay() abort | function! ale#virtualtext#ShowCursorWarningWithDelay() abort | ||||||
|     let l:buffer = bufnr('') |     let l:buffer = bufnr('') | ||||||
|  |  | ||||||
|     if !g:ale_virtualtext_cursor |     if g:ale_virtualtext_cursor != 1 | ||||||
|         return |         return | ||||||
|     endif |     endif | ||||||
|  |  | ||||||
| @ -145,3 +169,19 @@ function! ale#virtualtext#ShowCursorWarningWithDelay() abort | |||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
|  | function! ale#virtualtext#SetTexts(buf, loclist) abort | ||||||
|  |     if !has('nvim') && s:emulate_virt | ||||||
|  |         return | ||||||
|  |     endif | ||||||
|  |  | ||||||
|  |     call ale#virtualtext#Clear(a:buf) | ||||||
|  |  | ||||||
|  |     for l in a:loclist | ||||||
|  |         if l['bufnr'] != a:buf | ||||||
|  |             continue | ||||||
|  |         endif | ||||||
|  |  | ||||||
|  |         let hl = ale#virtualtext#GetHlGroup(l['type'], get(l, 'sub_type', '')) | ||||||
|  |         call ale#virtualtext#ShowMessage(l['text'], hl, a:buf, l['lnum']) | ||||||
|  |     endfor | ||||||
|  | endfunction | ||||||
|  | |||||||
| @ -219,5 +219,25 @@ g:ale_ruby_standardrb_options                   *g:ale_ruby_standardrb_options* | |||||||
|   This variable can be changed to modify flags given to standardrb. |   This variable can be changed to modify flags given to standardrb. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | =============================================================================== | ||||||
|  | syntax_tree                                              *ale-ruby-syntax_tree* | ||||||
|  |  | ||||||
|  | g:ale_ruby_syntax_tree_executable           *g:ale_ruby_syntax_tree_executable* | ||||||
|  |                                             *b:ale_ruby_syntax_tree_executable* | ||||||
|  |   Type: String | ||||||
|  |   Default: `'stree'` | ||||||
|  |  | ||||||
|  |   Override the invoked SyntaxTree binary. Set this to `'bundle'` to invoke | ||||||
|  |   `'bundle` `exec` stree'. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | g:ale_ruby_syntax_tree_options                 *g:ale_ruby_syntax_tree_options* | ||||||
|  |                                                *b:ale_ruby_syntax_tree_options* | ||||||
|  |   Type: |String| | ||||||
|  |   Default: `''` | ||||||
|  |  | ||||||
|  |   This variable can be changed to modify flags given to SyntaxTree. | ||||||
|  |  | ||||||
|  |  | ||||||
| =============================================================================== | =============================================================================== | ||||||
|   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: |   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: | ||||||
|  | |||||||
| @ -52,6 +52,8 @@ Notes: | |||||||
|   * `buildifier` |   * `buildifier` | ||||||
| * BibTeX | * BibTeX | ||||||
|   * `bibclean` |   * `bibclean` | ||||||
|  | * Bicep | ||||||
|  |   * `bicep` | ||||||
| * BitBake | * BitBake | ||||||
|   * `oelint-adv` |   * `oelint-adv` | ||||||
| * Bourne Shell | * Bourne Shell | ||||||
| @ -529,6 +531,7 @@ Notes: | |||||||
|   * `solargraph` |   * `solargraph` | ||||||
|   * `sorbet` |   * `sorbet` | ||||||
|   * `standardrb` |   * `standardrb` | ||||||
|  |   * `syntax_tree` | ||||||
| * Rust | * Rust | ||||||
|   * `cargo`!! |   * `cargo`!! | ||||||
|   * `cspell` |   * `cspell` | ||||||
| @ -664,6 +667,7 @@ Notes: | |||||||
| * YAML | * YAML | ||||||
|   * `actionlint` |   * `actionlint` | ||||||
|   * `circleci`!! |   * `circleci`!! | ||||||
|  |   * `gitlablint` | ||||||
|   * `prettier` |   * `prettier` | ||||||
|   * `spectral` |   * `spectral` | ||||||
|   * `swaglint` |   * `swaglint` | ||||||
|  | |||||||
| @ -42,7 +42,7 @@ volar                                                           *ale-vue-volar* | |||||||
| g:ale_vue_volar_executable                         *g:ale_vue_volar_executable* | g:ale_vue_volar_executable                         *g:ale_vue_volar_executable* | ||||||
|                                                    *b:ale_vue_volar_executable* |                                                    *b:ale_vue_volar_executable* | ||||||
|   Type: |String| |   Type: |String| | ||||||
|   Default: `'volar-server'` |   Default: `'vue-language-server'` | ||||||
|  |  | ||||||
|   See |ale-integrations-local-executables| |   See |ale-integrations-local-executables| | ||||||
|  |  | ||||||
|  | |||||||
| @ -280,5 +280,52 @@ g:ale_yaml_yamllint_options                       *g:ale_yaml_yamllint_options* | |||||||
|   This variable can be set to pass additional options to yamllint. |   This variable can be set to pass additional options to yamllint. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | =============================================================================== | ||||||
|  | gitlablint                                                  *ale-yaml-gitlablint* | ||||||
|  |  | ||||||
|  | Website: https://github.com/elijah-roberts/gitlab-lint | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Installation | ||||||
|  | ------------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  | Install yamllint in your a virtualenv directory, locally, or globally: > | ||||||
|  |  | ||||||
|  |   pip3 install gitlab_lint        # After activating virtualenv | ||||||
|  |   pip3 install --user gitlab_lint # Install to ~/.local/bin | ||||||
|  |   sudo pip3 install gitlab_lint   # Install globally | ||||||
|  |  | ||||||
|  | See |g:ale_virtualenv_dir_names| for configuring how ALE searches for | ||||||
|  | virtualenv directories. | ||||||
|  |  | ||||||
|  | Is recommended to use |g:ale_pattern_options| to enable this linter so it only | ||||||
|  | applies to 'gitlab-ci.yml' files and not all yaml files: | ||||||
|  | > | ||||||
|  |   let g:ale_pattern_options = { | ||||||
|  |   \   '.gitlab-ci\.yml$': { | ||||||
|  |   \       'ale_linters': ['gitlablint'], | ||||||
|  |   \   }, | ||||||
|  |   \} | ||||||
|  | < | ||||||
|  |  | ||||||
|  | Options | ||||||
|  | ------------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  | g:ale_yaml_gitlablint_executable               *g:ale_yaml_gitlablint_executable* | ||||||
|  |                                                *b:ale_yaml_gitlablint_executable* | ||||||
|  |   Type: |String| | ||||||
|  |   Default: `'gll'` | ||||||
|  |  | ||||||
|  |   This variable can be set to change the path to gll. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | g:ale_yaml_gitlablint_options                     *g:ale_yaml_gitlablint_options* | ||||||
|  |                                                   *b:ale_yaml_gitlablint_options* | ||||||
|  |   Type: |String| | ||||||
|  |   Default: `''` | ||||||
|  |  | ||||||
|  |   This variable can be set to pass additional options to gll. | ||||||
|  |  | ||||||
|  |  | ||||||
| =============================================================================== | =============================================================================== | ||||||
|   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: |   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: | ||||||
|  | |||||||
| @ -1234,6 +1234,29 @@ g:ale_floating_preview                                 *g:ale_floating_preview* | |||||||
|   |g:ale_detail_to_floating_preview| to `1`. |   |g:ale_detail_to_floating_preview| to `1`. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | g:ale_floating_preview_popup_opts             *g:ale_floating_preview_popup_opts* | ||||||
|  |  | ||||||
|  |   Type: |String| or |Dictionary| | ||||||
|  |   Default: `''` | ||||||
|  |  | ||||||
|  |   Either a dictionary of options or the string name of a function that returns a | ||||||
|  |   dictionary of options. This will be used as an argument to |popup_create| for | ||||||
|  |   Vim users or |nvim_open_win| for NeoVim users. Note that in either case, the | ||||||
|  |   resulting dictionary is merged with ALE defaults rather than expliciting overriding | ||||||
|  |   them. This only takes effect if |g:ale_floating_preview| is enabled. | ||||||
|  |  | ||||||
|  |   NOTE: for Vim users see |popup_create-arguments|, for NeoVim users see | ||||||
|  |   |nvim_open_win| for argument details | ||||||
|  |  | ||||||
|  |   For example, to enhance popups with a title: > | ||||||
|  |  | ||||||
|  |   function! CustomOpts() abort { | ||||||
|  |     let [l:info, l:loc] = ale#util#FindItemAtCursor(bufnr('')) | ||||||
|  |     return {'title': ' ALE: ' . (l:loc.linter_name) . ' '} | ||||||
|  |   endfunction | ||||||
|  | < | ||||||
|  |  | ||||||
|  |  | ||||||
| g:ale_floating_window_border                       *g:ale_floating_window_border* | g:ale_floating_window_border                       *g:ale_floating_window_border* | ||||||
|  |  | ||||||
|   Type: |List| |   Type: |List| | ||||||
| @ -2274,6 +2297,9 @@ g:ale_virtualtext_cursor                             *g:ale_virtualtext_cursor* | |||||||
|   column nearest to the cursor when the cursor is resting on a line which |   column nearest to the cursor when the cursor is resting on a line which | ||||||
|   contains a warning or error. This option can be set to `0` to disable this |   contains a warning or error. This option can be set to `0` to disable this | ||||||
|   behavior. |   behavior. | ||||||
|  |   When this option is set to `2`, then all warnings will be shown for the | ||||||
|  |   whole buffer, regardless of if the cursor is currently positioned in that | ||||||
|  |   line. | ||||||
|  |  | ||||||
|   Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|. |   Messages are only displayed after a short delay. See |g:ale_virtualtext_delay|. | ||||||
|  |  | ||||||
| @ -2761,6 +2787,8 @@ documented in additional help files. | |||||||
|     buildifier............................|ale-bazel-buildifier| |     buildifier............................|ale-bazel-buildifier| | ||||||
|   bib.....................................|ale-bib-options| |   bib.....................................|ale-bib-options| | ||||||
|     bibclean..............................|ale-bib-bibclean| |     bibclean..............................|ale-bib-bibclean| | ||||||
|  |   bicep...................................|ale-bicep-options| | ||||||
|  |     bicep.................................|ale-bicep-bicep| | ||||||
|   bitbake.................................|ale-bitbake-options| |   bitbake.................................|ale-bitbake-options| | ||||||
|     oelint-adv............................|ale-bitbake-oelint_adv| |     oelint-adv............................|ale-bitbake-oelint_adv| | ||||||
|   c.......................................|ale-c-options| |   c.......................................|ale-c-options| | ||||||
| @ -3167,6 +3195,7 @@ documented in additional help files. | |||||||
|     solargraph............................|ale-ruby-solargraph| |     solargraph............................|ale-ruby-solargraph| | ||||||
|     sorbet................................|ale-ruby-sorbet| |     sorbet................................|ale-ruby-sorbet| | ||||||
|     standardrb............................|ale-ruby-standardrb| |     standardrb............................|ale-ruby-standardrb| | ||||||
|  |     syntax_tree...........................|ale-ruby-syntax_tree| | ||||||
|   rust....................................|ale-rust-options| |   rust....................................|ale-rust-options| | ||||||
|     analyzer..............................|ale-rust-analyzer| |     analyzer..............................|ale-rust-analyzer| | ||||||
|     cargo.................................|ale-rust-cargo| |     cargo.................................|ale-rust-cargo| | ||||||
| @ -3302,6 +3331,7 @@ documented in additional help files. | |||||||
|     yaml-language-server..................|ale-yaml-language-server| |     yaml-language-server..................|ale-yaml-language-server| | ||||||
|     yamlfix...............................|ale-yaml-yamlfix| |     yamlfix...............................|ale-yaml-yamlfix| | ||||||
|     yamllint..............................|ale-yaml-yamllint| |     yamllint..............................|ale-yaml-yamllint| | ||||||
|  |     gitlablint............................|ale-yaml-gitlablint| | ||||||
|   yang....................................|ale-yang-options| |   yang....................................|ale-yang-options| | ||||||
|     yang-lsp..............................|ale-yang-lsp| |     yang-lsp..............................|ale-yang-lsp| | ||||||
|   zeek....................................|ale-zeek-options| |   zeek....................................|ale-zeek-options| | ||||||
|  | |||||||
| @ -322,7 +322,7 @@ nnoremap <silent> <Plug>(ale_go_to_definition_in_vsplit) :ALEGoToDefinition -vsp | |||||||
| nnoremap <silent> <Plug>(ale_go_to_type_definition) :ALEGoToTypeDefinition<Return> | nnoremap <silent> <Plug>(ale_go_to_type_definition) :ALEGoToTypeDefinition<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_type_definition_in_tab) :ALEGoToTypeDefinition -tab<Return> | nnoremap <silent> <Plug>(ale_go_to_type_definition_in_tab) :ALEGoToTypeDefinition -tab<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_type_definition_in_split) :ALEGoToTypeDefinition -split<Return> | nnoremap <silent> <Plug>(ale_go_to_type_definition_in_split) :ALEGoToTypeDefinition -split<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinitionIn -vsplit<Return> | nnoremap <silent> <Plug>(ale_go_to_type_definition_in_vsplit) :ALEGoToTypeDefinition -vsplit<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_implementation_in_tab) :ALEGoToImplementation -tab<Return> | nnoremap <silent> <Plug>(ale_go_to_implementation_in_tab) :ALEGoToImplementation -tab<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_implementation_in_split) :ALEGoToImplementation -split<Return> | nnoremap <silent> <Plug>(ale_go_to_implementation_in_split) :ALEGoToImplementation -split<Return> | ||||||
| nnoremap <silent> <Plug>(ale_go_to_implementation_in_vsplit) :ALEGoToImplementation -vsplit<Return> | nnoremap <silent> <Plug>(ale_go_to_implementation_in_vsplit) :ALEGoToImplementation -vsplit<Return> | ||||||
|  | |||||||
| @ -61,6 +61,8 @@ formatting. | |||||||
|   * [buildifier](https://github.com/bazelbuild/buildtools) |   * [buildifier](https://github.com/bazelbuild/buildtools) | ||||||
| * BibTeX | * BibTeX | ||||||
|   * [bibclean](http://ftp.math.utah.edu/pub/bibclean/) |   * [bibclean](http://ftp.math.utah.edu/pub/bibclean/) | ||||||
|  | * Bicep | ||||||
|  |   * [bicep](https://github.com/Azure/bicep) | ||||||
| * BitBake | * BitBake | ||||||
|   * [oelint-adv](https://github.com/priv-kweihmann/oelint-adv) |   * [oelint-adv](https://github.com/priv-kweihmann/oelint-adv) | ||||||
| * Bourne Shell | * Bourne Shell | ||||||
| @ -538,6 +540,7 @@ formatting. | |||||||
|   * [solargraph](https://solargraph.org) |   * [solargraph](https://solargraph.org) | ||||||
|   * [sorbet](https://github.com/sorbet/sorbet) |   * [sorbet](https://github.com/sorbet/sorbet) | ||||||
|   * [standardrb](https://github.com/testdouble/standard) |   * [standardrb](https://github.com/testdouble/standard) | ||||||
|  |   * [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) | ||||||
| * Rust | * Rust | ||||||
|   * [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) |   * [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) | ||||||
|   * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) |   * [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) | ||||||
| @ -673,6 +676,7 @@ formatting. | |||||||
| * YAML | * YAML | ||||||
|   * [actionlint](https://github.com/rhysd/actionlint) :warning: |   * [actionlint](https://github.com/rhysd/actionlint) :warning: | ||||||
|   * [circleci](https://circleci.com/docs/2.0/local-cli) :floppy_disk: :warning: |   * [circleci](https://circleci.com/docs/2.0/local-cli) :floppy_disk: :warning: | ||||||
|  |   * [gitlablint](https://github.com/elijah-roberts/gitlab-lint) | ||||||
|   * [prettier](https://github.com/prettier/prettier) |   * [prettier](https://github.com/prettier/prettier) | ||||||
|   * [spectral](https://github.com/stoplightio/spectral) |   * [spectral](https://github.com/stoplightio/spectral) | ||||||
|   * [swaglint](https://github.com/byCedric/swaglint) :warning: |   * [swaglint](https://github.com/byCedric/swaglint) :warning: | ||||||
|  | |||||||
| @ -50,6 +50,8 @@ if !exists("no_plugin_maps") && !exists("no_flake8_maps") | |||||||
|     endif |     endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
|  | command! Flake :call flake8#Flake8() | ||||||
|  |  | ||||||
| let &cpo = s:save_cpo | let &cpo = s:save_cpo | ||||||
| unlet s:save_cpo | unlet s:save_cpo | ||||||
|  |  | ||||||
|  | |||||||
| @ -1598,11 +1598,20 @@ function! fugitive#repo(...) abort | |||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_dir(...) dict abort | function! s:repo_dir(...) dict abort | ||||||
|   throw 'fugitive: fugitive#repo().dir() has been replaced by FugitiveGitDir()' |   if !a:0 | ||||||
|  |     return self.git_dir | ||||||
|  |   endif | ||||||
|  |   throw 'fugitive: fugitive#repo().dir("...") has been replaced by FugitiveFind(".git/...")' | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_tree(...) dict abort | function! s:repo_tree(...) dict abort | ||||||
|   throw 'fugitive: fugitive#repo().tree() has been replaced by FugitiveFind(":/")' |   let tree = s:Tree(self.git_dir) | ||||||
|  |   if empty(tree) | ||||||
|  |     throw 'fugitive: no work tree' | ||||||
|  |   elseif !a:0 | ||||||
|  |     return tree | ||||||
|  |   endif | ||||||
|  |   throw 'fugitive: fugitive#repo().tree("...") has been replaced by FugitiveFind(":(top)...")' | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_bare() dict abort | function! s:repo_bare() dict abort | ||||||
| @ -1628,11 +1637,11 @@ function! s:repo_git_command(...) dict abort | |||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_git_chomp(...) dict abort | function! s:repo_git_chomp(...) dict abort | ||||||
|   throw 'fugitive: fugitive#repo().git_chomp(...) has been replaced by FugitiveExecute(...).stdout' |   silent return substitute(system(fugitive#ShellCommand(a:000, self.git_dir)), '\n$', '', '') | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_git_chomp_in_tree(...) dict abort | function! s:repo_git_chomp_in_tree(...) dict abort | ||||||
|   throw 'fugitive: fugitive#repo().git_chomp_in_tree(...) has been replaced by FugitiveExecute(...).stdout' |   return call(self.git_chomp, a:000, self) | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! s:repo_rev_parse(rev) dict abort | function! s:repo_rev_parse(rev) dict abort | ||||||
| @ -1642,7 +1651,7 @@ endfunction | |||||||
| call s:add_methods('repo',['git_command','git_chomp','git_chomp_in_tree','rev_parse']) | call s:add_methods('repo',['git_command','git_chomp','git_chomp_in_tree','rev_parse']) | ||||||
|  |  | ||||||
| function! s:repo_config(name) dict abort | function! s:repo_config(name) dict abort | ||||||
|   throw 'fugitive: fugitive#repo().config(...) has been replaced by FugitiveConfigGet(...)' |   return FugitiveConfigGet(a:name, self.git_dir) | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| call s:add_methods('repo',['config']) | call s:add_methods('repo',['config']) | ||||||
| @ -2388,7 +2397,7 @@ function! s:GlobComplete(lead, pattern, ...) abort | |||||||
|   if a:lead ==# '/' |   if a:lead ==# '/' | ||||||
|     return [] |     return [] | ||||||
|   else |   else | ||||||
|     let results = glob(a:lead . a:pattern, a:0 ? a:1 : 0, 1) |     let results = glob(substitute(a:lead . a:pattern, '[\{}]', '\\&', 'g'), a:0 ? a:1 : 0, 1) | ||||||
|   endif |   endif | ||||||
|   call map(results, 'v:val !~# "/$" && isdirectory(v:val) ? v:val."/" : v:val') |   call map(results, 'v:val !~# "/$" && isdirectory(v:val) ? v:val."/" : v:val') | ||||||
|   call map(results, 'v:val[ strlen(a:lead) : -1 ]') |   call map(results, 'v:val[ strlen(a:lead) : -1 ]') | ||||||
| @ -7196,9 +7205,9 @@ function! s:BlameMaps(is_ftplugin) abort | |||||||
|   call s:Map('n', 'o',    ':<C-U>exe <SID>BlameCommit("split")<CR>', '<silent>', ft) |   call s:Map('n', 'o',    ':<C-U>exe <SID>BlameCommit("split")<CR>', '<silent>', ft) | ||||||
|   call s:Map('n', 'O',    ':<C-U>exe <SID>BlameCommit("tabedit")<CR>', '<silent>', ft) |   call s:Map('n', 'O',    ':<C-U>exe <SID>BlameCommit("tabedit")<CR>', '<silent>', ft) | ||||||
|   call s:Map('n', 'p',    ':<C-U>exe <SID>BlameCommit("pedit")<CR>', '<silent>', ft) |   call s:Map('n', 'p',    ':<C-U>exe <SID>BlameCommit("pedit")<CR>', '<silent>', ft) | ||||||
|   call s:Map('n', '.',    ":<C-U> <C-R>=substitute(<SID>BlameCommitFileLnum()[0],'^$','@','')<CR><Home>", ft) |   exe s:Map('n', '.',    ":<C-U> <C-R>=substitute(<SID>BlameCommitFileLnum()[0],'^$','@','')<CR><Home>", '', ft) | ||||||
|   call s:Map('n', '(',    "-", ft) |   exe s:Map('n', '(',    "-", '', ft) | ||||||
|   call s:Map('n', ')',    "+", ft) |   exe s:Map('n', ')',    "+", '', ft) | ||||||
|   call s:Map('n', 'A',    ":<C-u>exe 'vertical resize '.(<SID>linechars('.\\{-\\}\\ze [0-9:/+-][0-9:/+ -]* \\d\\+)')+1+v:count)<CR>", '<silent>', ft) |   call s:Map('n', 'A',    ":<C-u>exe 'vertical resize '.(<SID>linechars('.\\{-\\}\\ze [0-9:/+-][0-9:/+ -]* \\d\\+)')+1+v:count)<CR>", '<silent>', ft) | ||||||
|   call s:Map('n', 'C',    ":<C-u>exe 'vertical resize '.(<SID>linechars('^\\S\\+')+1+v:count)<CR>", '<silent>', ft) |   call s:Map('n', 'C',    ":<C-u>exe 'vertical resize '.(<SID>linechars('^\\S\\+')+1+v:count)<CR>", '<silent>', ft) | ||||||
|   call s:Map('n', 'D',    ":<C-u>exe 'vertical resize '.(<SID>linechars('.\\{-\\}\\ze\\d\\ze\\s\\+\\d\\+)')+1-v:count)<CR>", '<silent>', ft) |   call s:Map('n', 'D',    ":<C-u>exe 'vertical resize '.(<SID>linechars('.\\{-\\}\\ze\\d\\ze\\s\\+\\d\\+)')+1-v:count)<CR>", '<silent>', ft) | ||||||
|  | |||||||
| @ -689,6 +689,9 @@ augroup fugitive | |||||||
|         \ if FugitiveIsGitDir(expand('<amatch>:p:h')) | |         \ if FugitiveIsGitDir(expand('<amatch>:p:h')) | | ||||||
|         \   let b:git_dir = s:Slash(expand('<amatch>:p:h')) | |         \   let b:git_dir = s:Slash(expand('<amatch>:p:h')) | | ||||||
|         \   exe fugitive#BufReadStatus(v:cmdbang) | |         \   exe fugitive#BufReadStatus(v:cmdbang) | | ||||||
|  |         \   echohl WarningMSG | | ||||||
|  |         \   echo "fugitive: Direct editing of .git/" . expand('%:t') . " is deprecated" | | ||||||
|  |         \   echohl NONE | | ||||||
|         \ elseif filereadable(expand('<amatch>')) | |         \ elseif filereadable(expand('<amatch>')) | | ||||||
|         \   silent doautocmd BufReadPre | |         \   silent doautocmd BufReadPre | | ||||||
|         \   keepalt noautocmd read <amatch> | |         \   keepalt noautocmd read <amatch> | | ||||||
|  | |||||||
| @ -1,8 +1,8 @@ | |||||||
| let s:available = has('nvim') || ( | let s:available = has('nvim') || ( | ||||||
|       \   has('job') && ( |       \   has('job') && ( | ||||||
|       \     (has('patch-7-4-1826') && !has('gui_running')) || |       \     (has('patch-7.4.1826') && !has('gui_running')) || | ||||||
|       \     (has('patch-7-4-1850') &&  has('gui_running')) || |       \     (has('patch-7.4.1850') &&  has('gui_running')) || | ||||||
|       \     (has('patch-7-4-1832') &&  has('gui_macvim')) |       \     (has('patch-7.4.1832') &&  has('gui_macvim')) | ||||||
|       \   ) |       \   ) | ||||||
|       \ ) |       \ ) | ||||||
|  |  | ||||||
|  | |||||||
| @ -245,8 +245,10 @@ function! s:on_bufenter() | |||||||
|   " been any changes to the buffer since the first round, the second round |   " been any changes to the buffer since the first round, the second round | ||||||
|   " will be cheap. |   " will be cheap. | ||||||
|   if has('vim_starting') && !$VIM_GITGUTTER_TEST |   if has('vim_starting') && !$VIM_GITGUTTER_TEST | ||||||
|     if exists('*timer_start') |     if exists('*timer_start') && has('lambda') | ||||||
|       call timer_start(&updatetime, 'GitGutterCursorHold') |       call s:next_tick("call gitgutter#process_buffer(+".bufnr('').", 0)") | ||||||
|  |     else | ||||||
|  |       call gitgutter#process_buffer(bufnr(''), 0) | ||||||
|     endif |     endif | ||||||
|     return |     return | ||||||
|   endif |   endif | ||||||
| @ -259,10 +261,6 @@ function! s:on_bufenter() | |||||||
|   endif |   endif | ||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! GitGutterCursorHold(timer) |  | ||||||
|   execute 'doautocmd' s:nomodeline 'gitgutter CursorHold' |  | ||||||
| endfunction |  | ||||||
|  |  | ||||||
| function! s:next_tick(cmd) | function! s:next_tick(cmd) | ||||||
|   call timer_start(1, {-> execute(a:cmd)}) |   call timer_start(1, {-> execute(a:cmd)}) | ||||||
| endfunction | endfunction | ||||||
|  | |||||||
| @ -18,7 +18,8 @@ syntax region jsDocTypeRecord   contained start=/{/ end=/}/ contains=jsDocTypeRe | |||||||
| syntax region jsDocTypeRecord   contained start=/\[/ end=/\]/ contains=jsDocTypeRecord extend | syntax region jsDocTypeRecord   contained start=/\[/ end=/\]/ contains=jsDocTypeRecord extend | ||||||
| syntax region jsDocTypeNoParam  contained start="{" end="}" oneline | syntax region jsDocTypeNoParam  contained start="{" end="}" oneline | ||||||
| syntax match  jsDocTypeNoParam  contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" | syntax match  jsDocTypeNoParam  contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" | ||||||
| syntax match  jsDocParam        contained "\%(#\|\$\|-\|'\|\"\|{.\{-}}\|\w\|\.\|:\|\/\|\[.\{-}]\|=\)\+" | syntax match  jsDocParam        contained "\%(#\|\$\|-\|'\|\"\|{.\{-}}\|\w\|\~\|\.\|:\|\/\|\[.\{-}]\|=\)\+" | ||||||
|  |  | ||||||
| syntax region jsDocSeeTag       contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags | syntax region jsDocSeeTag       contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags | ||||||
|  |  | ||||||
| if version >= 508 || !exists("did_javascript_syn_inits") | if version >= 508 || !exists("did_javascript_syn_inits") | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ syntax match   jsNoise          /[:;]/ | |||||||
| syntax match   jsNoise          /,/ skipwhite skipempty nextgroup=@jsExpression | syntax match   jsNoise          /,/ skipwhite skipempty nextgroup=@jsExpression | ||||||
| syntax match   jsDot            /\./ skipwhite skipempty nextgroup=jsObjectProp,jsFuncCall,jsPrototype,jsTaggedTemplate | syntax match   jsDot            /\./ skipwhite skipempty nextgroup=jsObjectProp,jsFuncCall,jsPrototype,jsTaggedTemplate | ||||||
| syntax match   jsObjectProp     contained /\<\K\k*/ | syntax match   jsObjectProp     contained /\<\K\k*/ | ||||||
| syntax match   jsFuncCall       /\<\K\k*\ze\s*(/ | syntax match   jsFuncCall       /\<\K\k*\ze[\s\n]*(/ | ||||||
| syntax match   jsParensError    /[)}\]]/ | syntax match   jsParensError    /[)}\]]/ | ||||||
|  |  | ||||||
| " Program Keywords | " Program Keywords | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ There are many flavors of markdown, each one with an unique feature set. This pl | |||||||
|  |  | ||||||
| ## Style | ## Style | ||||||
|  |  | ||||||
| When choosing between multiple valid Markdown syntaxes, the default behavior must be that specified at: <http://www.cirosantilli.com/markdown-styleguide> | When choosing between multiple valid Markdown syntaxes, the default behavior must be that specified at: <https://cirosantilli.com/markdown-style-guide> | ||||||
|  |  | ||||||
| If you wish to have a behavior that differs from that style guide, add an option to turn it on or off, and leave it off by default. | If you wish to have a behavior that differs from that style guide, add an option to turn it on or off, and leave it off by default. | ||||||
|  |  | ||||||
|  | |||||||
| @ -398,11 +398,6 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") | |||||||
|  |  | ||||||
|   SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine |   SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine | ||||||
|  |  | ||||||
|   if !exists("ruby_minlines") |  | ||||||
|     let ruby_minlines = 500 |  | ||||||
|   endif |  | ||||||
|   exe "syn sync minlines=" . ruby_minlines |  | ||||||
|  |  | ||||||
| else | else | ||||||
|   syn match rubyControl "\<def\>"    nextgroup=rubyMethodDeclaration skipwhite skipnl |   syn match rubyControl "\<def\>"    nextgroup=rubyMethodDeclaration skipwhite skipnl | ||||||
|   syn match rubyControl "\<class\>"  nextgroup=rubyClassDeclaration  skipwhite skipnl |   syn match rubyControl "\<class\>"  nextgroup=rubyClassDeclaration  skipwhite skipnl | ||||||
| @ -411,6 +406,11 @@ else | |||||||
|   syn match rubyKeyword "\<\%(alias\|undef\)\>" |   syn match rubyKeyword "\<\%(alias\|undef\)\>" | ||||||
| endif | endif | ||||||
|  |  | ||||||
|  | if !exists("ruby_minlines") | ||||||
|  |   let ruby_minlines = 500 | ||||||
|  | endif | ||||||
|  | exe "syn sync minlines=" . ruby_minlines | ||||||
|  |  | ||||||
| " Special Methods {{{1 | " Special Methods {{{1 | ||||||
| if !exists("ruby_no_special_methods") | if !exists("ruby_no_special_methods") | ||||||
|   syn match rubyAccess	  "\<\%(public\|protected\|private\)\>" " use re=2 |   syn match rubyAccess	  "\<\%(public\|protected\|private\)\>" " use re=2 | ||||||
|  | |||||||
| @ -27,6 +27,12 @@ snippets by typing the name of a snippet hitting the expansion mapping. | |||||||
|   snippets/* |   snippets/* | ||||||
| - [github.com/Shougo/neosnippet](https://github.com/Shougo/neosnippet.vim): | - [github.com/Shougo/neosnippet](https://github.com/Shougo/neosnippet.vim): | ||||||
|   VimL, supports snippets/* with some configuration. |   VimL, supports snippets/* with some configuration. | ||||||
|  | - [github.com/dcampos/nvim-snippy](https://github.com/dcampos/nvim-snippy): | ||||||
|  |   Lua, supports snippets/* with some configuration. | ||||||
|  | - [github.com/L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip): | ||||||
|  |   Lua, supports snippets/* with some configuration. | ||||||
|  |   Also supports redefining snippets without changing the priority, unlike | ||||||
|  |   nvim-snippy. | ||||||
| - [github.com/drmingdrmer/xptemplate](https://github.com/drmingdrmer/xptemplate): | - [github.com/drmingdrmer/xptemplate](https://github.com/drmingdrmer/xptemplate): | ||||||
|   Totally different syntax, does not read snippets contained in this file, but |   Totally different syntax, does not read snippets contained in this file, but | ||||||
|   it is also very powerful. It does not support vim-snippets (just listing it |   it is also very powerful. It does not support vim-snippets (just listing it | ||||||
| @ -46,6 +52,9 @@ If you have VimL only (vim without python support) your best option is using | |||||||
| [garbas/vim-snipmate](https://github.com/garbas/vim-snipmate) and cope with the | [garbas/vim-snipmate](https://github.com/garbas/vim-snipmate) and cope with the | ||||||
| minor bugs found in the engine. | minor bugs found in the engine. | ||||||
|  |  | ||||||
|  | If you use Neovim and prefer Lua plugins, | ||||||
|  | [L3MON4D3/LuaSnip](https://github.com/L3MON4D3/LuaSnip) is the best option. | ||||||
|  |  | ||||||
| **Q**: Should snipMate be deprecated in favour of UltiSnips? | **Q**: Should snipMate be deprecated in favour of UltiSnips? | ||||||
|  |  | ||||||
| **A**: No, because snipMate is VimL, and UltiSnips requires Python. | **A**: No, because snipMate is VimL, and UltiSnips requires Python. | ||||||
|  | |||||||
| @ -30,6 +30,11 @@ endglobal | |||||||
| ########################################################################### | ########################################################################### | ||||||
| #                            TextMate Snippets                            # | #                            TextMate Snippets                            # | ||||||
| ########################################################################### | ########################################################################### | ||||||
|  | snippet ponce "#pragma once include guard" | ||||||
|  | #pragma once | ||||||
|  |  | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
| snippet main | snippet main | ||||||
| int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||||||
| { | { | ||||||
| @ -67,6 +72,14 @@ namespace${1/.+/ /m}${1:`!p snip.rv = snip.basename or "name"`} | |||||||
| }${1/.+/ \/* /m}$1${1/.+/ *\/ /m} | }${1/.+/ \/* /m}$1${1/.+/ *\/ /m} | ||||||
| endsnippet | endsnippet | ||||||
|  |  | ||||||
|  | snippet nsa "namespace alias" | ||||||
|  | namespace ${1:alias} = ${2:namespace}; | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet using "using directive/using declaration/type alias" | ||||||
|  | using ${1:namespace}`!p snip.rv = ' ' if t[1] == 'namespace' else ' = ' if t[1] != '' else ''`${2:name}; | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
| snippet readfile "read file (readF)" | snippet readfile "read file (readF)" | ||||||
| std::vector<char> v; | std::vector<char> v; | ||||||
| if (FILE *fp = fopen(${1:"filename"}, "r")) | if (FILE *fp = fopen(${1:"filename"}, "r")) | ||||||
|  | |||||||
| @ -104,11 +104,11 @@ snippet local "local x = 1" | |||||||
| local ${1:x} = ${0:1} | local ${1:x} = ${0:1} | ||||||
| endsnippet | endsnippet | ||||||
|  |  | ||||||
| snippet use "Use" Ab | snippet use "Use" b | ||||||
| use { '$1' } | use { '$1' } | ||||||
| endsnippet | endsnippet | ||||||
|  |  | ||||||
| snippet req "Require" | snippet req "Require" b | ||||||
| require('$1') | require('$1') | ||||||
| endsnippet | endsnippet | ||||||
|  |  | ||||||
|  | |||||||
| @ -454,27 +454,6 @@ snippet docls "Document Class" bA | |||||||
| \documentclass{$1}$0 | \documentclass{$1}$0 | ||||||
| endsnippet | endsnippet | ||||||
|  |  | ||||||
| snippet tmplt "Template" |  | ||||||
| \documentclass{article} |  | ||||||
|  |  | ||||||
| \usepackage{import} |  | ||||||
| \usepackage{pdfpages} |  | ||||||
| \usepackage{transparent} |  | ||||||
| \usepackage{xcolor} |  | ||||||
| $1 |  | ||||||
|  |  | ||||||
| \newcommand{\incfig}[2][1]{% |  | ||||||
| 		\def\svgwidth{#1\columnwidth} |  | ||||||
| 		\import{./figures/}{#2.pdf_tex} |  | ||||||
| } |  | ||||||
| $2 |  | ||||||
| \pdfsuppresswarningpagegroup=1 |  | ||||||
|  |  | ||||||
| \begin{document} |  | ||||||
| 		$0 |  | ||||||
| \end{document} |  | ||||||
| endsnippet |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ######### | ######### | ||||||
| # OTHER # | # OTHER # | ||||||
|  | |||||||
| @ -114,7 +114,7 @@ snippet forr | |||||||
| 	} | 	} | ||||||
| # If Condition | # If Condition | ||||||
| snippet if | snippet if | ||||||
| 	if (${1:/* condition */}) { | 	if ($1) { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet el | snippet el | ||||||
| @ -122,8 +122,8 @@ snippet el | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| # Ternary conditional | # Ternary conditional | ||||||
| snippet t | snippet t Ternary: `condition ? true : false` | ||||||
| 	${1:/* condition */} ? ${2:a} : ${0:b} | 	$1 ? $2 : $0 | ||||||
| snippet fun | snippet fun | ||||||
| 	function ${1:function_name}(${2})${3} | 	function ${1:function_name}(${2})${3} | ||||||
| 	{ | 	{ | ||||||
| @ -150,4 +150,3 @@ snippet FlxSprite | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ snippet def | |||||||
|  |  | ||||||
| # if | # if | ||||||
| snippet if | snippet if | ||||||
| 	if (${1:/* condition */}) { | 	if ($1) { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| # else | # else | ||||||
| @ -29,12 +29,12 @@ snippet el | |||||||
| 	} | 	} | ||||||
| # else if | # else if | ||||||
| snippet elif | snippet elif | ||||||
| 	else if (${1:/* condition */}) { | 	else if ($1) { | ||||||
| 		${2} | 		${2} | ||||||
| 	} | 	} | ||||||
| # ifi | # ifi | ||||||
| snippet ifi | snippet ifi | ||||||
| 	if (${1:/* condition */}) ${2}; | 	if ($1) ${2}; | ||||||
|  |  | ||||||
| # switch | # switch | ||||||
| snippet switch | snippet switch | ||||||
| @ -63,14 +63,14 @@ snippet forr | |||||||
| 	} | 	} | ||||||
| # while | # while | ||||||
| snippet wh | snippet wh | ||||||
| 	while (${1:/* condition */}) { | 	while ($1) { | ||||||
| 		${2} | 		${2} | ||||||
| 	} | 	} | ||||||
| # do... while | # do... while | ||||||
| snippet do | snippet do | ||||||
| 	do { | 	do { | ||||||
| 		${2} | 		${2} | ||||||
| 	} while (${1:/* condition */}); | 	} while ($1); | ||||||
| ## | ## | ||||||
| ## Functions | ## Functions | ||||||
| # function definition | # function definition | ||||||
|  | |||||||
| @ -1,16 +1,16 @@ | |||||||
| snippet if | snippet if | ||||||
| 	If ${1:condition} Then | 	If $1 Then | ||||||
| 		${0:; True code} | 		${0:; True code} | ||||||
| 	EndIf | 	EndIf | ||||||
| snippet el | snippet el | ||||||
| 	Else | 	Else | ||||||
| 		${0} | 		${0} | ||||||
| snippet eif | snippet eif | ||||||
| 	ElseIf ${1:condition} Then | 	ElseIf $1 Then | ||||||
| 		${0:; True code} | 		${0:; True code} | ||||||
| # If/Else block | # If/Else block | ||||||
| snippet ife | snippet ife | ||||||
| 	If ${1:condition} Then | 	If $1 Then | ||||||
| 		${2:; True code} | 		${2:; True code} | ||||||
| 	Else | 	Else | ||||||
| 		${0:; Else code} | 		${0:; Else code} | ||||||
| @ -26,7 +26,7 @@ snippet ifelif | |||||||
| 	EndIf | 	EndIf | ||||||
| # Switch block | # Switch block | ||||||
| snippet switch | snippet switch | ||||||
| 	Switch (${1:condition}) | 	Switch ($1) | ||||||
| 	Case ${2:case1}: | 	Case ${2:case1}: | ||||||
| 		${3:; Case 1 code} | 		${3:; Case 1 code} | ||||||
| 	Case Else: | 	Case Else: | ||||||
| @ -34,7 +34,7 @@ snippet switch | |||||||
| 	EndSwitch | 	EndSwitch | ||||||
| # Select block | # Select block | ||||||
| snippet select | snippet select | ||||||
| 	Select (${1:condition}) | 	Select ($1) | ||||||
| 	Case ${2:case1}: | 	Case ${2:case1}: | ||||||
| 		${3:; Case 1 code} | 		${3:; Case 1 code} | ||||||
| 	Case Else: | 	Case Else: | ||||||
| @ -42,7 +42,7 @@ snippet select | |||||||
| 	EndSelect | 	EndSelect | ||||||
| # While loop | # While loop | ||||||
| snippet wh | snippet wh | ||||||
| 	While (${1:condition}) | 	While ($1) | ||||||
| 		${0:; code...} | 		${0:; code...} | ||||||
| 	WEnd | 	WEnd | ||||||
| # For loop | # For loop | ||||||
|  | |||||||
| @ -4,23 +4,23 @@ snippet main | |||||||
| 	int main(int argc, char *argv[]) | 	int main(int argc, char *argv[]) | ||||||
| 	{ | 	{ | ||||||
| 		${0} | 		${0} | ||||||
| 		return 0; |  | ||||||
| 	} | 	} | ||||||
| # main(void) | # main(void) | ||||||
| snippet mainn | snippet mainn | ||||||
| 	int main(void) | 	int main(void) | ||||||
| 	{ | 	{ | ||||||
| 		${0} | 		${0} | ||||||
| 		return 0; |  | ||||||
| 	} | 	} | ||||||
| ## | ## | ||||||
| ## Preprocessor | ## Preprocessor | ||||||
| # #include <...> | # #include <...> | ||||||
| snippet inc | snippet inc | ||||||
| 	#include <${1:stdio}.h> | 	#include <${1:stdio}.h> | ||||||
|  | 	$0 | ||||||
| # #include "..." | # #include "..." | ||||||
| snippet Inc | snippet Inc | ||||||
| 	#include "${1:`vim_snippets#Filename("$1.h")`}" | 	#include "${1:`vim_snippets#Filename("$1.h")`}" | ||||||
|  | 	$0 | ||||||
| # ifndef...define...endif | # ifndef...define...endif | ||||||
| snippet ndef | snippet ndef | ||||||
| 	#ifndef $1 | 	#ifndef $1 | ||||||
| @ -86,8 +86,8 @@ snippet elif | |||||||
| snippet ifi | snippet ifi | ||||||
| 	if (${1:true}) ${0}; | 	if (${1:true}) ${0}; | ||||||
| # ternary | # ternary | ||||||
| snippet t | snippet t Ternary: `condition ? true : false` | ||||||
| 	${1:/* condition */} ? ${2:a} : ${3:b} | 	$1 ? $2 : $0 | ||||||
| # switch | # switch | ||||||
| snippet switch | snippet switch | ||||||
| 	switch (${1:/* variable */}) { | 	switch (${1:/* variable */}) { | ||||||
| @ -111,6 +111,8 @@ snippet case | |||||||
| 		${3:break;} | 		${3:break;} | ||||||
| snippet ret | snippet ret | ||||||
| 	return ${0}; | 	return ${0}; | ||||||
|  | snippet ex | ||||||
|  | 	exit($0); | ||||||
| ## | ## | ||||||
| ## Loops | ## Loops | ||||||
| # for | # for | ||||||
| @ -125,14 +127,18 @@ snippet forr | |||||||
| 	} | 	} | ||||||
| # while | # while | ||||||
| snippet wh | snippet wh | ||||||
| 	while (${1:/* condition */}) { | 	while (${1:1}) { | ||||||
|  | 		${0:${VISUAL}} | ||||||
|  | 	} | ||||||
|  | snippet wht | ||||||
|  | 	while (true) { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| # do... while | # do... while | ||||||
| snippet do | snippet do | ||||||
| 	do { | 	do { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} while (${1:/* condition */}); | 	} while ($1); | ||||||
| ## | ## | ||||||
| ## Functions | ## Functions | ||||||
| # function definition | # function definition | ||||||
| @ -277,6 +283,14 @@ snippet prf | |||||||
| 	printf("${1:} = %f\n", $1); | 	printf("${1:} = %f\n", $1); | ||||||
| snippet prx | snippet prx | ||||||
| 	printf("${1:} = %${2}\n", $1); | 	printf("${1:} = %${2}\n", $1); | ||||||
|  | snippet warn | ||||||
|  | 	warn("${1:%s}"$0); | ||||||
|  | snippet warnx | ||||||
|  | 	warnx("${1:%s}"$0); | ||||||
|  | snippet err | ||||||
|  | 	err(${1:1}, "${2:%s}"$0); | ||||||
|  | snippet errx | ||||||
|  | 	errx(${1:1}, "${2:%s}"$0); | ||||||
| # getopt | # getopt | ||||||
| snippet getopt | snippet getopt | ||||||
| 	int choice; | 	int choice; | ||||||
| @ -337,7 +351,7 @@ snippet getopt | |||||||
|  |  | ||||||
| ## Assertions | ## Assertions | ||||||
| snippet asr | snippet asr | ||||||
| 	assert(${1:condition}); | 	assert($1); | ||||||
|  |  | ||||||
| snippet anl | snippet anl | ||||||
| 	assert(${1:ptr} != NULL); | 	assert(${1:ptr} != NULL); | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ snippet print | |||||||
| snippet reduce | snippet reduce | ||||||
| 	(reduce ${1:(fn [p n] ${3})} ${2}) | 	(reduce ${1:(fn [p n] ${3})} ${2}) | ||||||
| snippet when | snippet when | ||||||
| 	(when ${1:test} ${0:body}) | 	(when ${1:test} $0) | ||||||
| snippet when-let | snippet when-let | ||||||
| 	(when-let [${1:result} ${2:test}] | 	(when-let [${1:result} ${2:test}] | ||||||
| 		${0:body}) | 		$0) | ||||||
|  | |||||||
| @ -99,7 +99,7 @@ snippet ci_db-select | |||||||
| snippet ci_db-from | snippet ci_db-from | ||||||
| 	$this->db->from("${1:table}");${2} | 	$this->db->from("${1:table}");${2} | ||||||
| snippet ci_db-join | snippet ci_db-join | ||||||
| 	$this->db->join("${1:table}", "${2:condition}", "${3:type}");${4} | 	$this->db->join("${1:table}", "$2", "${3:type}");${4} | ||||||
| snippet ci_db-where | snippet ci_db-where | ||||||
| 	$this->db->where("${1:key}", "${2:value}");${3} | 	$this->db->where("${1:key}", "${2:value}");${3} | ||||||
| snippet ci_db-or_where | snippet ci_db-or_where | ||||||
|  | |||||||
| @ -2,37 +2,37 @@ | |||||||
| snippet forindo | snippet forindo | ||||||
| 	for ${1:name} in ${2:array} | 	for ${1:name} in ${2:array} | ||||||
| 		do ($1) -> | 		do ($1) -> | ||||||
| 			${0:// body} | 			$0 | ||||||
| # Array comprehension | # Array comprehension | ||||||
| snippet fora | snippet fora | ||||||
| 	for ${1:name} in ${2:array} | 	for ${1:name} in ${2:array} | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Object comprehension | # Object comprehension | ||||||
| snippet foro | snippet foro | ||||||
| 	for ${1:key}, ${2:value} of ${3:object} | 	for ${1:key}, ${2:value} of ${3:object} | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Range comprehension (inclusive) | # Range comprehension (inclusive) | ||||||
| snippet forr | snippet forr | ||||||
| 	for ${1:name} in [${2:start}..${3:finish}] | 	for ${1:name} in [${2:start}..${3:finish}] | ||||||
| 		${0:# body...} | 		$0 | ||||||
| snippet forrb | snippet forrb | ||||||
| 	for ${1:name} in [${2:start}..${3:finish}] by ${4:step} | 	for ${1:name} in [${2:start}..${3:finish}] by ${4:step} | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Range comprehension (exclusive) | # Range comprehension (exclusive) | ||||||
| snippet forrex | snippet forrex | ||||||
| 	for ${1:name} in [${2:start}...${3:finish}] | 	for ${1:name} in [${2:start}...${3:finish}] | ||||||
| 		${0:# body...} | 		$0 | ||||||
| snippet forrexb | snippet forrexb | ||||||
| 	for ${1:name} in [${2:start}...${3:finish}] by ${4:step} | 	for ${1:name} in [${2:start}...${3:finish}] by ${4:step} | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Function | # Function | ||||||
| snippet fun | snippet fun | ||||||
| 	(${1:args}) -> | 	(${1:args}) -> | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Function (bound) | # Function (bound) | ||||||
| snippet bfun | snippet bfun | ||||||
| 	(${1:args}) => | 	(${1:args}) => | ||||||
| 		${0:# body...} | 		$0 | ||||||
| # Class | # Class | ||||||
| snippet cla class .. | snippet cla class .. | ||||||
| 	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} | 	class ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} | ||||||
| @ -54,29 +54,29 @@ snippet cla class .. extends .. constructor: .. | |||||||
| 		${0} | 		${0} | ||||||
| # If | # If | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| # If __ Else | # If __ Else | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0:# body...} | 		${0} | ||||||
| # Else if | # Else if | ||||||
| snippet eif | snippet eif | ||||||
| 	else if ${1:condition} | 	else if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| # Ternary If | # Ternary If | ||||||
| snippet ifte | snippet ifte Ternary | ||||||
| 	if ${1:condition} then ${2:value} else ${0:other} | 	if $1 then $2 else $0 | ||||||
| # Unless | # Unless | ||||||
| snippet unl | snippet unl Unless | ||||||
| 	${1:action} unless ${0:condition} | 	$1 unless $0 | ||||||
| # Switch | # Switch | ||||||
| snippet swi | snippet swi | ||||||
| 	switch ${1:object} | 	switch ${1:object} | ||||||
| 		when ${2:value} | 		when ${2:value} | ||||||
| 			${0:# body...} | 			$0 | ||||||
|  |  | ||||||
| # Log | # Log | ||||||
| snippet log | snippet log | ||||||
|  | |||||||
| @ -1,5 +1,13 @@ | |||||||
| extends c | extends c | ||||||
|  |  | ||||||
|  | ## Main | ||||||
|  | # main() | ||||||
|  | snippet mainn | ||||||
|  | 	int main() | ||||||
|  | 	{ | ||||||
|  | 		${0} | ||||||
|  | 		return 0; | ||||||
|  | 	} | ||||||
| ## | ## | ||||||
| ## Preprocessor | ## Preprocessor | ||||||
| # #include <...> | # #include <...> | ||||||
|  | |||||||
| @ -1,12 +1,12 @@ | |||||||
| snippet req require | snippet req require | ||||||
| 	require "${1}" | 	require "${1}" | ||||||
| snippet case | snippet case | ||||||
| 	case ${1:object} | 	case $1 | ||||||
| 	when ${2:condition} | 	when $2 | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet when | snippet when | ||||||
| 	when ${1:condition} | 	when $1 | ||||||
| 		${0} | 		${0} | ||||||
| snippet def | snippet def | ||||||
| 	def ${1:method_name} | 	def ${1:method_name} | ||||||
| @ -17,17 +17,17 @@ snippet pdef | |||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet wh | snippet wh | ||||||
| 	while ${1:condition} | 	while $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet cla class .. end | snippet cla class .. end | ||||||
|  | |||||||
| @ -61,15 +61,15 @@ snippet fore | |||||||
| 	  ${0} | 	  ${0} | ||||||
| 	} | 	} | ||||||
| snippet wh | snippet wh | ||||||
| 	while (${1:/* condition */}) { | 	while ($1) { | ||||||
| 	  ${0} | 	  ${0} | ||||||
| 	} | 	} | ||||||
| snippet dowh | snippet dowh | ||||||
| 	do { | 	do { | ||||||
| 	  ${0} | 	  ${0} | ||||||
| 	} while (${0:/* condition */}); | 	} while ($0); | ||||||
| snippet as | snippet as | ||||||
| 	assert(${0:/* condition */}); | 	assert($0); | ||||||
| snippet try | snippet try | ||||||
| 	try { | 	try { | ||||||
| 	  ${0:${VISUAL}} | 	  ${0:${VISUAL}} | ||||||
|  | |||||||
| @ -13,29 +13,29 @@ snippet if if .. do .. end | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet if: if .. do: .. | snippet if: if .. do: .. | ||||||
| 	if ${1:condition}, do: ${0} | 	if $1, do: ${0} | ||||||
| snippet ife if .. do .. else .. end | snippet ife if .. do .. else .. end | ||||||
| 	if ${1:condition} do | 	if $1 do | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet ife: if .. do: .. else: | snippet ife: if .. do: .. else: | ||||||
| 	if ${1:condition}, do: ${2}, else: ${0} | 	if $1, do: ${2}, else: ${0} | ||||||
| snippet unless unless .. do .. end | snippet unless unless .. do .. end | ||||||
| 	unless ${1} do | 	unless ${1} do | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet unless: unless .. do: .. | snippet unless: unless .. do: .. | ||||||
| 	unless ${1:condition}, do: ${0} | 	unless $1, do: ${0} | ||||||
| snippet unlesse unless .. do .. else .. end | snippet unlesse unless .. do .. else .. end | ||||||
| 	unless ${1:condition} do | 	unless $1 do | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet unlesse: unless .. do: .. else: | snippet unlesse: unless .. do: .. else: | ||||||
| 	unless ${1:condition}, do: ${2}, else: ${0} | 	unless $1, do: ${2}, else: ${0} | ||||||
| snippet cond | snippet cond | ||||||
| 	cond do | 	cond do | ||||||
| 		${1} -> | 		${1} -> | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ snippet dt | |||||||
| 	erlang:display({${1}, ${0}}), | 	erlang:display({${1}, ${0}}), | ||||||
| # define directive | # define directive | ||||||
| snippet def | snippet def | ||||||
| 	-define(${1:macro}, ${2:body}). | 	-define(${1:macro}, $2). | ||||||
| # export directive | # export directive | ||||||
| snippet exp | snippet exp | ||||||
| 	-export([${1:function}/${0:arity}]). | 	-export([${1:function}/${0:arity}]). | ||||||
| @ -44,17 +44,17 @@ snippet undef | |||||||
| snippet if | snippet if | ||||||
| 	if | 	if | ||||||
| 		${1:guard} -> | 		${1:guard} -> | ||||||
| 			${0:body} | 			$0 | ||||||
| 	end | 	end | ||||||
| # case expression | # case expression | ||||||
| snippet case | snippet case | ||||||
| 	case ${1:expression} of | 	case ${1:expression} of | ||||||
| 		${2:pattern} -> | 		${2:pattern} -> | ||||||
| 			${0:body}; | 			$0; | ||||||
| 	end | 	end | ||||||
| # anonymous function | # anonymous function | ||||||
| snippet fun | snippet fun | ||||||
| 	fun (${1:Parameters}) -> ${2:body} end | 	fun (${1:Parameters}) -> $2 end | ||||||
| # try...catch | # try...catch | ||||||
| snippet try | snippet try | ||||||
| 	try | 	try | ||||||
| @ -65,10 +65,10 @@ snippet try | |||||||
| snippet rcv "Receive Expression" | snippet rcv "Receive Expression" | ||||||
| 	receive | 	receive | ||||||
| 	${1:	${2:pattern}${3: when ${4:guard}} -> | 	${1:	${2:pattern}${3: when ${4:guard}} -> | ||||||
| 			${5:body}} | 			$5 | ||||||
| 	${6:after | 	${6:after | ||||||
| 		${7:expression} -> | 		${7:expression} -> | ||||||
| 			${8:body}} | 			$8 | ||||||
| 	end | 	end | ||||||
| # record directive | # record directive | ||||||
| snippet rec | snippet rec | ||||||
|  | |||||||
| @ -19,13 +19,13 @@ snippet class | |||||||
|  |  | ||||||
| # If | # If | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| # If else | # If else | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${0} | 		${0} | ||||||
| 	else | 	else | ||||||
| 	    ${1} | 	    ${1} | ||||||
| @ -33,7 +33,7 @@ snippet ife | |||||||
|  |  | ||||||
| # If else if | # If else if | ||||||
| snippet eif | snippet eif | ||||||
| 	elif ${1:condition} | 	elif $1 | ||||||
| 		${0} | 		${0} | ||||||
|  |  | ||||||
| # Switch case | # Switch case | ||||||
|  | |||||||
| @ -64,7 +64,7 @@ snippet intent | |||||||
| snippet / | snippet / | ||||||
| 	(/ $1 /) ${2:,&} ${0} | 	(/ $1 /) ${2:,&} ${0} | ||||||
| snippet if | snippet if | ||||||
| 	if (${1:condition}) then | 	if ($1) then | ||||||
| 		${0} | 		${0} | ||||||
| 	end if | 	end if | ||||||
| snippet case | snippet case | ||||||
| @ -78,7 +78,7 @@ snippet do | |||||||
| 		${0} | 		${0} | ||||||
| 	end do | 	end do | ||||||
| snippet dow | snippet dow | ||||||
| 	do while (${1:condition}) | 	do while ($1) | ||||||
| 		$2 | 		$2 | ||||||
| 	end do | 	end do | ||||||
| snippet sub | snippet sub | ||||||
|  | |||||||
| @ -64,13 +64,13 @@ snippet inf "full interface " | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| snippet if "if condition" | snippet if "if condition" | ||||||
| 	if ${1:/* condition */} { | 	if $1 { | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
| snippet ife "if else condition" | snippet ife "if else condition" | ||||||
| 	if ${1:/* condition */} { | 	if $1 { | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	} else { | 	} else { | ||||||
| 		${0} | 		${0} | ||||||
|  | |||||||
| @ -26,12 +26,12 @@ snippet mt | |||||||
| snippet mts | snippet mts | ||||||
| 	= mail_to ${1:email_address}, ${2:name}, :subject => ${3}, :body => ${4} | 	= mail_to ${1:email_address}, ${2:name}, :subject => ${3}, :body => ${4} | ||||||
| snippet ife | snippet ife | ||||||
| 	- if ${1:condition} | 	- if $1 | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	- else | 	- else | ||||||
| 		${0} | 		${0} | ||||||
| snippet ifp | snippet ifp | ||||||
| 	- if ${1:condition}.presence? | 	- if $1.presence? | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet ntc | snippet ntc | ||||||
| 	= number_to_currency(${1}) | 	= number_to_currency(${1}) | ||||||
|  | |||||||
| @ -441,10 +441,9 @@ snippet html5 | |||||||
| 			<meta charset="utf-8"> | 			<meta charset="utf-8"> | ||||||
| 			<meta name="viewport" content="width=device-width"> | 			<meta name="viewport" content="width=device-width"> | ||||||
| 			<title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title> | 			<title>${1:`substitute(vim_snippets#Filename('', 'Page Title'), '^.', '\u&', '')`}</title> | ||||||
| 			${2:link} |  | ||||||
| 		</head> | 		</head> | ||||||
| 		<body> | 		<body> | ||||||
| 			${0:body} | 			$0 | ||||||
| 		</body> | 		</body> | ||||||
| 	</html> | 	</html> | ||||||
| snippet html5l | snippet html5l | ||||||
| @ -457,7 +456,7 @@ snippet html5l | |||||||
| 			${3:link} | 			${3:link} | ||||||
| 		</head> | 		</head> | ||||||
| 		<body> | 		<body> | ||||||
| 			${0:body} | 			$0 | ||||||
| 		</body> | 		</body> | ||||||
| 	</html> | 	</html> | ||||||
| snippet i | snippet i | ||||||
|  | |||||||
| @ -24,11 +24,11 @@ snippet for | |||||||
| snippet from | snippet from | ||||||
| 	{% from ${1:x} import ${0:y} %} | 	{% from ${1:x} import ${0:y} %} | ||||||
| snippet if | snippet if | ||||||
| 	{% if ${1:condition} %} | 	{% if $1 %} | ||||||
| 	  ${0} | 	  ${0} | ||||||
| 	{% end %} | 	{% end %} | ||||||
| snippet eif | snippet eif | ||||||
| 	{% elif ${0:condition} %} | 	{% elif $0 %} | ||||||
| snippet el | snippet el | ||||||
| 	{% else %} | 	{% else %} | ||||||
| snippet import | snippet import | ||||||
| @ -50,6 +50,6 @@ snippet try | |||||||
| 	  ${0} | 	  ${0} | ||||||
| 	{% end %} | 	{% end %} | ||||||
| snippet wh | snippet wh | ||||||
| 	{% while ${1:condition} %} | 	{% while $1 %} | ||||||
| 	  ${0} | 	  ${0} | ||||||
| 	{% end %} | 	{% end %} | ||||||
|  | |||||||
| @ -142,9 +142,9 @@ snippet ae | |||||||
| snippet aae | snippet aae | ||||||
| 	assertArrayEquals("${1:Failure message}", ${2:expecteds}, ${3:actuals}); | 	assertArrayEquals("${1:Failure message}", ${2:expecteds}, ${3:actuals}); | ||||||
| snippet af | snippet af | ||||||
| 	assertFalse("${1:Failure message}", ${2:condition}); | 	assertFalse("${1:Failure message}", $2); | ||||||
| snippet at | snippet at | ||||||
| 	assertTrue("${1:Failure message}", ${2:condition}); | 	assertTrue("${1:Failure message}", $2); | ||||||
| snippet an | snippet an | ||||||
| 	assertNull("${1:Failure message}", ${2:object}); | 	assertNull("${1:Failure message}", ${2:object}); | ||||||
| snippet ann | snippet ann | ||||||
| @ -211,7 +211,9 @@ snippet enfor | |||||||
| snippet for | snippet for | ||||||
| 	for (${1}; ${2}; ${3}) ${0} | 	for (${1}; ${2}; ${3}) ${0} | ||||||
| snippet wh | snippet wh | ||||||
| 	while (${1}) ${0} | 	while (${1:true}) ${0} | ||||||
|  | snippet wht | ||||||
|  | 	while (true) ${0} | ||||||
| ## | ## | ||||||
| ## Main method | ## Main method | ||||||
| snippet psvm | snippet psvm | ||||||
|  | |||||||
| @ -62,8 +62,8 @@ snippet ife "if (condition) { ... } else { ... }" | |||||||
| 		${2} | 		${2} | ||||||
| 	} | 	} | ||||||
| # tertiary conditional | # tertiary conditional | ||||||
| snippet ter | snippet ter Ternary: `condition ? true : false` | ||||||
| 	${1:/* condition */} ? ${2:/* if true */} : ${0:/* if false */} | 	$1 ? $2: $0 | ||||||
| # switch | # switch | ||||||
| snippet switch | snippet switch | ||||||
| 	switch (${1:expression}) { | 	switch (${1:expression}) { | ||||||
| @ -107,13 +107,17 @@ snippet forr "reversed for (...) {...}" | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet wh "(condition) { ... }" | snippet wh "(condition) { ... }" | ||||||
| 	while (${1:/* condition */}) { | 	while (${1:true}) { | ||||||
|  | 		${0:${VISUAL}} | ||||||
|  | 	} | ||||||
|  | snippet wht "(true) { ... }" | ||||||
|  | 	while (true) { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet do "do { ... } while (condition)" | snippet do "do { ... } while (condition)" | ||||||
| 	do { | 	do { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} while (${1:/* condition */}); | 	} while ($1); | ||||||
| # For in loop | # For in loop | ||||||
| snippet fori | snippet fori | ||||||
| 	for (let ${1:prop} in ${2:object}) { | 	for (let ${1:prop} in ${2:object}) { | ||||||
|  | |||||||
| @ -2,32 +2,32 @@ | |||||||
| # https://marketplace.visualstudio.com/items?itemName=killalau.vscode-liquid-snippets | # https://marketplace.visualstudio.com/items?itemName=killalau.vscode-liquid-snippets | ||||||
|  |  | ||||||
| snippet if | snippet if | ||||||
| 	{% if ${1:condition} %} | 	{% if $1 %} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	{% endif %} | 	{% endif %} | ||||||
| snippet else | snippet else | ||||||
| 	{% else %} | 	{% else %} | ||||||
| snippet elsif | snippet elsif | ||||||
| 	{% elsif ${1:condition} %} | 	{% elsif $1 %} | ||||||
| snippet ifelse | snippet ifelse | ||||||
| 	{% if ${1:condition} %} | 	{% if $1 %} | ||||||
| 		${2} | 		${2} | ||||||
| 	{% else %} | 	{% else %} | ||||||
| 		${0} | 		${0} | ||||||
| 	{% endif %} | 	{% endif %} | ||||||
| snippet unless | snippet unless | ||||||
| 	{% unless ${1:condition} %} | 	{% unless $1 %} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	{% endunless %} | 	{% endunless %} | ||||||
| snippet case | snippet case | ||||||
| 	{% case ${1:variable} %} | 	{% case ${1:variable} %} | ||||||
| 		{% when ${2:condition} %} | 		{% when $2 %} | ||||||
| 			${3} | 			${3} | ||||||
| 		{% else %} | 		{% else %} | ||||||
| 			${0} | 			${0} | ||||||
| 	{% endcase %} | 	{% endcase %} | ||||||
| snippet when | snippet when | ||||||
| 	{% when ${1:condition} %} | 	{% when $1 %} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet cycle | snippet cycle | ||||||
| 	{% cycle '${1:odd}', '${2:even}' %} | 	{% cycle '${1:odd}', '${2:even}' %} | ||||||
| @ -102,32 +102,32 @@ snippet javascript | |||||||
| snippet comment- | snippet comment- | ||||||
| 	{%- comment -%}${0:${VISUAL}}{%- endcomment -%} | 	{%- comment -%}${0:${VISUAL}}{%- endcomment -%} | ||||||
| snippet if- | snippet if- | ||||||
| 	{%- if ${1:condition} -%} | 	{%- if $1 -%} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	{%- endif -%} | 	{%- endif -%} | ||||||
| snippet else- | snippet else- | ||||||
| 	{%- else -%} | 	{%- else -%} | ||||||
| snippet elsif- | snippet elsif- | ||||||
| 	{%- elsif ${1:condition} -%} | 	{%- elsif $1 -%} | ||||||
| snippet ifelse- | snippet ifelse- | ||||||
| 	{%- if ${1:condition} -%} | 	{%- if $1 -%} | ||||||
| 		${2} | 		${2} | ||||||
| 	{%- else -%} | 	{%- else -%} | ||||||
| 		${0} | 		${0} | ||||||
| 	{%- endif -%} | 	{%- endif -%} | ||||||
| snippet unless- | snippet unless- | ||||||
| 	{%- unless ${1:condition} -%} | 	{%- unless $1 -%} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	{%- endunless -%} | 	{%- endunless -%} | ||||||
| snippet case- | snippet case- | ||||||
| 	{%- case ${1:variable} -%} | 	{%- case ${1:variable} -%} | ||||||
| 		{%- when ${2:condition} -%} | 		{%- when $2 -%} | ||||||
| 			${3} | 			${3} | ||||||
| 		{%- else -%} | 		{%- else -%} | ||||||
| 			${0} | 			${0} | ||||||
| 	{%- endcase -%} | 	{%- endcase -%} | ||||||
| snippet when- | snippet when- | ||||||
| 	{%- when ${1:condition} -%} | 	{%- when $1 -%} | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet cycle- | snippet cycle- | ||||||
| 	{%- cycle '${1:odd}', '${2:even}' -%} | 	{%- cycle '${1:odd}', '${2:even}' -%} | ||||||
|  | |||||||
| @ -66,8 +66,8 @@ snippet elif | |||||||
| snippet ifi | snippet ifi | ||||||
| 	if(${1:true}) ${0}; | 	if(${1:true}) ${0}; | ||||||
| # ternary | # ternary | ||||||
| snippet t | snippet t Ternary: `condition ? true : false` | ||||||
| 	${1:/* condition */} ? ${2:a} : ${3:b} | 	$1 ? $2 : $0 | ||||||
| # switch | # switch | ||||||
| snippet switch | snippet switch | ||||||
| 	switch(${1:/* variable */}) | 	switch(${1:/* variable */}) | ||||||
| @ -115,7 +115,7 @@ snippet forr | |||||||
| 	} | 	} | ||||||
| # while | # while | ||||||
| snippet wh | snippet wh | ||||||
| 	while(${1:/* condition */}) | 	while($1) | ||||||
| 	{ | 	{ | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| @ -123,7 +123,7 @@ snippet wh | |||||||
| snippet do | snippet do | ||||||
| 	do{ | 	do{ | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	}while (${1:/* condition */}); | 	}while ($1); | ||||||
| ## | ## | ||||||
| ## Functions | ## Functions | ||||||
| # function definition | # function definition | ||||||
|  | |||||||
| @ -54,24 +54,24 @@ snippet cla class .. extends .. constructor: .. | |||||||
| 		${5} | 		${5} | ||||||
| # If | # If | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${2} | 		${2} | ||||||
| # If __ Else | # If __ Else | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${2} | 		${2} | ||||||
| 	else | 	else | ||||||
| 		${3} | 		${3} | ||||||
| # Else if | # Else if | ||||||
| snippet elif | snippet elif | ||||||
| 	else if ${1:condition} | 	else if $1 | ||||||
| 		${2} | 		${2} | ||||||
| # Ternary If | # Ternary If | ||||||
| snippet ifte | snippet ifte | ||||||
| 	if ${1:condition} then ${2:value} else ${3:other} | 	if $1 then $2 else $0 | ||||||
| # Unless | # Unless | ||||||
| snippet unl | snippet unl | ||||||
| 	${1:action} unless ${2:condition} | 	$1 unless $0 | ||||||
| # Switch | # Switch | ||||||
| snippet swi | snippet swi | ||||||
| 	switch ${1:object} | 	switch ${1:object} | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ snippet local | |||||||
| 	local ${1:x} = ${0:1} | 	local ${1:x} = ${0:1} | ||||||
| snippet fun | snippet fun | ||||||
| 	function ${1:fname}(${2:...}) | 	function ${1:fname}(${2:...}) | ||||||
| 		${0:-- body} | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet for | snippet for | ||||||
| 	for ${1:i}=${2:1},${3:10} do | 	for ${1:i}=${2:1},${3:10} do | ||||||
| @ -13,34 +13,60 @@ snippet for | |||||||
| 	end | 	end | ||||||
| snippet forp | snippet forp | ||||||
| 	for ${1:i},${2:v} in pairs(${3:table_name}) do | 	for ${1:i},${2:v} in pairs(${3:table_name}) do | ||||||
| 		${0:-- body} | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet fori | snippet fori | ||||||
| 	for ${1:i},${2:v} in ipairs(${3:table_name}) do | 	for ${1:i},${2:v} in ipairs(${3:table_name}) do | ||||||
| 		${0:-- body} | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} then | 	if $1 then | ||||||
| 		${2:-- body} | 		$2 | ||||||
| 	end | 	end | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} then | 	if $1 then | ||||||
| 		${2:-- if condition} | 		${2:-- if condition} | ||||||
| 	else | 	else | ||||||
| 		${0:-- else} | 		${0:-- else} | ||||||
| 	end | 	end | ||||||
| snippet elif | snippet elif | ||||||
| 	elseif ${1:condition} then | 	elseif $1 then | ||||||
| 		${0:--body} | 		$0 | ||||||
| snippet repeat | snippet repeat | ||||||
| 	repeat | 	repeat | ||||||
| 		${1:--body} | 		$1 | ||||||
| 	until ${0:condition} | 	until $0 | ||||||
| snippet while | snippet while | ||||||
| 	while ${1:condition} do | 	while $1 do | ||||||
| 		${0:--body} | 		$0 | ||||||
|  | 	end | ||||||
|  | snippet wh | ||||||
|  | 	while ${1:true} do | ||||||
|  | 		${0} | ||||||
|  | 	end | ||||||
|  | snippet wht | ||||||
|  | 	while true do | ||||||
|  | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet print | snippet print | ||||||
| 	print("${1:string}") | 	print("${1:string}") | ||||||
|  | snippet pr | ||||||
|  | 	print($0) | ||||||
|  | snippet prs | ||||||
|  | 	print("$0") | ||||||
|  | snippet prf | ||||||
|  | 	print(string.format("${1:%s}"$0)) | ||||||
|  | snippet wr | ||||||
|  | 	io.write($0) | ||||||
|  | snippet wrs | ||||||
|  | 	io.write("$0") | ||||||
|  | snippet wrf | ||||||
|  | 	io.write(string.format("${1:%s}"$0)) | ||||||
|  | snippet fwr | ||||||
|  | 	io.${1:stderr}:write($0) | ||||||
|  | snippet fwrs | ||||||
|  | 	io.${1:stderr}:write("$0") | ||||||
|  | snippet fwrf | ||||||
|  | 	io.${1:stderr}:write(string.format("${2:%s}"$0)) | ||||||
| snippet im | snippet im | ||||||
| 	import "${1:import file}" | 	import "${1:import file}" | ||||||
|  | |||||||
| @ -19,11 +19,11 @@ snippet for | |||||||
| 		${0:} | 		${0:} | ||||||
| 	% endfor | 	% endfor | ||||||
| snippet if if | snippet if if | ||||||
| 	% if ${1:condition}: | 	% if $1: | ||||||
| 		${0:} | 		${0:} | ||||||
| 	% endif | 	% endif | ||||||
| snippet ife if/else | snippet ife if/else | ||||||
| 	% if ${1:condition}: | 	% if $1: | ||||||
| 		${2:} | 		${2:} | ||||||
| 	% else: | 	% else: | ||||||
| 		${0:} | 		${0:} | ||||||
|  | |||||||
| @ -67,17 +67,21 @@ snippet <* | |||||||
| 	<`@*`> | 	<`@*`> | ||||||
| snippet <c | snippet <c | ||||||
| 	<`@+`> | 	<`@+`> | ||||||
| snippet ** | snippet ** Bold | ||||||
| 	**${1:bold}** | 	**$0** | ||||||
| snippet __ | snippet __ Bold | ||||||
| 	__${1:bold}__ | 	__$0__ | ||||||
| snippet === | snippet --- Front matter | ||||||
|  | 	--- | ||||||
|  | 	$0 | ||||||
|  | 	--- | ||||||
|  | snippet ==== | ||||||
| 	`repeat('=', strlen(getline(line('.') - 3)))` | 	`repeat('=', strlen(getline(line('.') - 3)))` | ||||||
|  |  | ||||||
| 	${0} | 	${0} | ||||||
| snippet - | snippet - | ||||||
| 	-   ${0} | 	-   ${0} | ||||||
| snippet --- | snippet ---- | ||||||
| 	`repeat('-', strlen(getline(line('.') - 3)))` | 	`repeat('-', strlen(getline(line('.') - 3)))` | ||||||
|  |  | ||||||
| 	${0} | 	${0} | ||||||
| @ -142,3 +146,11 @@ snippet pullquote | |||||||
| 	{% pullquote %} | 	{% pullquote %} | ||||||
| 	${1:text} {" ${2:quote} "} ${0:text} | 	${1:text} {" ${2:quote} "} ${0:text} | ||||||
| 	{% endpullquote %} | 	{% endpullquote %} | ||||||
|  |  | ||||||
|  | # Definition lists | ||||||
|  | snippet : Definition list | ||||||
|  | 	$1 | ||||||
|  | 	: $0 | ||||||
|  | snippet :: Alternate definition list | ||||||
|  | 	$1 | ||||||
|  | 	  - $0 | ||||||
|  | |||||||
| @ -1,2 +1 @@ | |||||||
| extends markdown | extends markdown | ||||||
|  |  | ||||||
|  | |||||||
| @ -40,7 +40,7 @@ snippet eif | |||||||
| 	} | 	} | ||||||
| # Conditional One-line | # Conditional One-line | ||||||
| snippet xif | snippet xif | ||||||
| 	${1:expression} if ${2:condition}; | 	$1 if $0; | ||||||
| # Unless conditional | # Unless conditional | ||||||
| snippet unless | snippet unless | ||||||
| 	unless (${1}) { | 	unless (${1}) { | ||||||
| @ -48,7 +48,7 @@ snippet unless | |||||||
| 	} | 	} | ||||||
| # Unless conditional One-line | # Unless conditional One-line | ||||||
| snippet xunless | snippet xunless | ||||||
| 	${1:expression} unless ${2:condition}; | 	$1 unless $0; | ||||||
| # Try/Except | # Try/Except | ||||||
| snippet eval | snippet eval | ||||||
| 	local $@; | 	local $@; | ||||||
| @ -65,7 +65,7 @@ snippet wh | |||||||
| 	} | 	} | ||||||
| # While Loop One-line | # While Loop One-line | ||||||
| snippet xwh | snippet xwh | ||||||
| 	${1:expression} while ${2:condition}; | 	$1 while $0; | ||||||
| # C-style For Loop | # C-style For Loop | ||||||
| snippet cfor | snippet cfor | ||||||
| 	for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { | 	for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { | ||||||
| @ -73,7 +73,7 @@ snippet cfor | |||||||
| 	} | 	} | ||||||
| # For loop one-line | # For loop one-line | ||||||
| snippet xfor | snippet xfor | ||||||
| 	${1:expression} for @${2:array}; | 	$1 for @$0; | ||||||
| # Foreach Loop | # Foreach Loop | ||||||
| snippet for | snippet for | ||||||
| 	foreach my $${1:x} (@${2:array}) { | 	foreach my $${1:x} (@${2:array}) { | ||||||
| @ -81,7 +81,7 @@ snippet for | |||||||
| 	} | 	} | ||||||
| # Foreach Loop One-line | # Foreach Loop One-line | ||||||
| snippet fore | snippet fore | ||||||
| 	${1:expression} foreach @${2:array}; | 	$1 foreach @$0; | ||||||
| # Package | # Package | ||||||
| snippet package | snippet package | ||||||
| 	package ${1:`expand('%:p:s?.*lib/??:r:gs?/?::?')`}; | 	package ${1:`expand('%:p:s?.*lib/??:r:gs?/?::?')`}; | ||||||
|  | |||||||
| @ -33,7 +33,7 @@ snippet eif | |||||||
| 	} | 	} | ||||||
| # Conditional One-line | # Conditional One-line | ||||||
| snippet xif | snippet xif | ||||||
| 	${1:expression} if ${2:condition}; | 	${1} if $2; | ||||||
| # Unless conditional | # Unless conditional | ||||||
| snippet unless | snippet unless | ||||||
| 	unless ${1} { | 	unless ${1} { | ||||||
| @ -41,14 +41,14 @@ snippet unless | |||||||
| 	} | 	} | ||||||
| # Unless conditional One-line | # Unless conditional One-line | ||||||
| snippet xunless | snippet xunless | ||||||
| 	${1:expression} unless ${2:condition}; | 	${1} unless $2; | ||||||
| # Ternary conditional | # Ternary conditional | ||||||
| snippet tc | snippet tc | ||||||
| 	${1:condition} ?? ${2:value-if-true} !! ${3:value-if-false}; | 	$1 ?? ${2:value-if-true} !! ${3:value-if-false}; | ||||||
| # given - when (perl6 switch) | # given - when (perl6 switch) | ||||||
| snippet switch | snippet switch | ||||||
| 	given ${1:$var} { | 	given ${1:$var} { | ||||||
| 	  when ${2:condition} { | 	  when $2 { | ||||||
| 		  ${3:# code block ...} | 		  ${3:# code block ...} | ||||||
| 	  } | 	  } | ||||||
| 	  ${4} | 	  ${4} | ||||||
|  | |||||||
| @ -86,7 +86,7 @@ snippet =?: | |||||||
| snippet ?: | snippet ?: | ||||||
| 	${1:true} ? ${2:a} : ${0} | 	${1:true} ? ${2:a} : ${0} | ||||||
| snippet t "$retVal = (condition) ? a : b" | snippet t "$retVal = (condition) ? a : b" | ||||||
| 	$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b}; | 	$${1:retVal} = ($2) ? ${3:a} : ${4:b}; | ||||||
| # Predefined variables | # Predefined variables | ||||||
| snippet C | snippet C | ||||||
| 	$_COOKIE['${1:variable}'] | 	$_COOKIE['${1:variable}'] | ||||||
| @ -283,7 +283,7 @@ snippet def "define('VARIABLE_NAME', 'definition')" | |||||||
| snippet def? | snippet def? | ||||||
| 	${1}defined('${2}') | 	${1}defined('${2}') | ||||||
| snippet wh "while (condition) { ... }" | snippet wh "while (condition) { ... }" | ||||||
| 	while (${1:/* condition */}) { | 	while ($1) { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet do "do { ... } while (condition)" | snippet do "do { ... } while (condition)" | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ snippet ps | |||||||
| snippet pb | snippet pb | ||||||
| 	create or replace package body ${1:name} | 	create or replace package body ${1:name} | ||||||
| 	as | 	as | ||||||
| 		${0:-- body} | 		$0 | ||||||
| 	end; -- end of package body $1; | 	end; -- end of package body $1; | ||||||
| # package procedure spec | # package procedure spec | ||||||
| snippet pps | snippet pps | ||||||
| @ -18,7 +18,7 @@ snippet ppb | |||||||
| 	procedure ${1:name}(${2:args}) | 	procedure ${1:name}(${2:args}) | ||||||
| 	as | 	as | ||||||
| 	begin | 	begin | ||||||
| 		${0:-- body} | 		$0 | ||||||
| 	end $2; | 	end $2; | ||||||
| # package function spec | # package function spec | ||||||
| snippet pfs | snippet pfs | ||||||
| @ -31,7 +31,7 @@ snippet pfb | |||||||
| 	as | 	as | ||||||
| 		l_res	$3; | 		l_res	$3; | ||||||
| 	begin | 	begin | ||||||
| 		${0:-- body}; | 		$0; | ||||||
| 		return l_res; | 		return l_res; | ||||||
| 	end $1; | 	end $1; | ||||||
| # snow errors | # snow errors | ||||||
|  | |||||||
| @ -64,7 +64,7 @@ snippet for | |||||||
| 	}; | 	}; | ||||||
| #loop while | #loop while | ||||||
| snippet wh | snippet wh | ||||||
| 	while (${1:/* condition */}) { | 	while ($1) { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| #break | #break | ||||||
|  | |||||||
| @ -43,13 +43,13 @@ snippet enum | |||||||
|  |  | ||||||
| # PowerShell if..then | # PowerShell if..then | ||||||
| snippet if | snippet if | ||||||
| 	if (${1:condition}) { | 	if ($1) { | ||||||
| 		${2:statement} | 		$0 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| # PowerShell if..else | # PowerShell if..else | ||||||
| snippet ife | snippet ife | ||||||
| 	if ( ${1:condition} ) { | 	if ( $1 ) { | ||||||
| 		${2} | 		${2} | ||||||
| 	} | 	} | ||||||
| 	else { | 	else { | ||||||
| @ -58,8 +58,8 @@ snippet ife | |||||||
|  |  | ||||||
| # PowerShell While Loop | # PowerShell While Loop | ||||||
| snippet while | snippet while | ||||||
| 	while (${1:condition}) { | 	while ($1) { | ||||||
| 		${2:statement} | 		$0 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| # PowerShell Filter..Sort | # PowerShell Filter..Sort | ||||||
| @ -69,7 +69,7 @@ snippet filtersort | |||||||
| # PowerShell foreach | # PowerShell foreach | ||||||
| snippet foreach | snippet foreach | ||||||
| 	foreach ( $${1:iterator} in $${2:collection} ) { | 	foreach ( $${1:iterator} in $${2:collection} ) { | ||||||
| 		${3:statement} | 		$0 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| # PowerShell export-csv | # PowerShell export-csv | ||||||
|  | |||||||
| @ -28,14 +28,14 @@ snippet sk "skip unittests" b | |||||||
| 	@unittest.skip(${1:skip_reason}) | 	@unittest.skip(${1:skip_reason}) | ||||||
|  |  | ||||||
| snippet wh | snippet wh | ||||||
| 	while ${1:condition}: | 	while $1: | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
|  |  | ||||||
| # dowh - does the same as do...while in other languages | # dowh - does the same as do...while in other languages | ||||||
| snippet dowh | snippet dowh | ||||||
| 	while True: | 	while True: | ||||||
| 		${1} | 		${1} | ||||||
| 		if ${0:condition}: | 		if $0: | ||||||
| 			break | 			break | ||||||
|  |  | ||||||
| snippet with | snippet with | ||||||
| @ -115,13 +115,13 @@ snippet property | |||||||
|  |  | ||||||
| # Ifs | # Ifs | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition}: | 	if $1: | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet el | snippet el | ||||||
| 	else: | 	else: | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet ei | snippet ei | ||||||
| 	elif ${1:condition}: | 	elif $1: | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
|  |  | ||||||
| # Match | # Match | ||||||
| @ -508,3 +508,16 @@ snippet numeric "methods for emulating a numeric type" b | |||||||
| 	def __coerce__(self, other): | 	def __coerce__(self, other): | ||||||
| 		${25:pass} | 		${25:pass} | ||||||
|  |  | ||||||
|  | # Printing | ||||||
|  | snippet pr | ||||||
|  | 	print($0) | ||||||
|  | snippet prs | ||||||
|  | 	print("$0") | ||||||
|  | snippet prf | ||||||
|  | 	print(f"$0") | ||||||
|  | snippet fpr | ||||||
|  | 	print($0, file=${1:sys.stderr}) | ||||||
|  | snippet fprs | ||||||
|  | 	print("$0", file=${1:sys.stderr}) | ||||||
|  | snippet fprf | ||||||
|  | 	print(f"$0", file=${1:sys.stderr}) | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ snippet source | |||||||
|  |  | ||||||
| # conditionals | # conditionals | ||||||
| snippet if | snippet if | ||||||
| 	if (${1:condition}) { | 	if ($1) { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet el | snippet el | ||||||
| @ -19,14 +19,18 @@ snippet el | |||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet ei | snippet ei | ||||||
| 	else if (${1:condition}) { | 	else if ($1) { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| # loops | # loops | ||||||
| snippet wh | snippet wh | ||||||
| 	while(${1}) { | 	while(${1:true}) { | ||||||
| 		${2} | 		${0} | ||||||
|  | 	} | ||||||
|  | snippet wht | ||||||
|  | 	while(true) { | ||||||
|  | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet for | snippet for | ||||||
| 	for (${1:item} in ${2:list}) { | 	for (${1:item} in ${2:list}) { | ||||||
|  | |||||||
| @ -6,6 +6,8 @@ | |||||||
| # vim's `"*` register---i.e., the contents of the | # vim's `"*` register---i.e., the contents of the | ||||||
| # system clipboard---to insert text. | # system clipboard---to insert text. | ||||||
|  |  | ||||||
|  | extends markdown | ||||||
|  |  | ||||||
| # Insert Title Block | # Insert Title Block | ||||||
| snippet %% | snippet %% | ||||||
| 	% ${1:`Filename('', 'title')`} | 	% ${1:`Filename('', 'title')`} | ||||||
| @ -20,70 +22,12 @@ snippet %%* | |||||||
|  |  | ||||||
| 	${4} | 	${4} | ||||||
|  |  | ||||||
| # Insert Definition List |  | ||||||
| snippet :: |  | ||||||
| 	${1:term} |  | ||||||
| 	  ~  ${2:definition} |  | ||||||
|  |  | ||||||
| # Underline with `=`s or `-`s |  | ||||||
| snippet === |  | ||||||
| 	`repeat('=', strlen(getline(line(".") - 1)))` |  | ||||||
| 	 |  | ||||||
| 	${1} |  | ||||||
| snippet --- |  | ||||||
| 	`repeat('-', strlen(getline(line(".") - 1)))` |  | ||||||
| 	 |  | ||||||
| 	${1} |  | ||||||
|  |  | ||||||
| # Links and their kin |  | ||||||
| # ------------------- |  | ||||||
| # |  | ||||||
| # (These don't play very well with delimitMate) |  | ||||||
| # |  | ||||||
|  |  | ||||||
| snippet [ |  | ||||||
| 	[${1:link}](http://${2:url} "${3:title}")${4} |  | ||||||
| snippet [* |  | ||||||
| 	[${1:link}](${2:`@*`} "${3:title}")${4} |  | ||||||
|  |  | ||||||
| snippet [: |  | ||||||
| 	[${1:id}]: http://${2:url} "${3:title}" |  | ||||||
| snippet [:* |  | ||||||
| 	[${1:id}]: ${2:`@*`} "${3:title}" |  | ||||||
|  |  | ||||||
| snippet [@ |  | ||||||
| 	[${1:link}](mailto:${2:email})${3} |  | ||||||
| snippet [@* |  | ||||||
| 	[${1:link}](mailto:${2:`@*`})${3} |  | ||||||
|  |  | ||||||
| snippet [:@ |  | ||||||
| 	[${1:id}]: mailto:${2:email} "${3:title}" |  | ||||||
| snippet [:@* |  | ||||||
| 	[${1:id}]: mailto:${2:`@*`} "${3:title}" |  | ||||||
|  |  | ||||||
| snippet ${4} |  | ||||||
| snippet ${4} |  | ||||||
|  |  | ||||||
| snippet ![: |  | ||||||
| 	![${1:id}]: ${2:url} "${3:title}" |  | ||||||
| snippet ![:* |  | ||||||
| 	![${1:id}]: ${2:`@*`} "${3:title}" |  | ||||||
|  |  | ||||||
| snippet [^: |  | ||||||
| 	[^${1:id}]: ${2:note} |  | ||||||
| snippet [^:* |  | ||||||
| 	[^${1:id}]: ${2:`@*`} |  | ||||||
|  |  | ||||||
| # |  | ||||||
|  |  | ||||||
| # library() | # library() | ||||||
| snippet req | snippet req | ||||||
| 	require(${1:}, quietly = TRUE) | 	require(${1:}, quietly = TRUE) | ||||||
| # If Condition | # If Condition | ||||||
| snippet if | snippet if | ||||||
| 	if ( ${1:condition} ) | 	if ( $1 ) | ||||||
| 	{ | 	{ | ||||||
| 		${2:} | 		${2:} | ||||||
| 	} | 	} | ||||||
| @ -107,7 +51,7 @@ snippet fun | |||||||
| snippet re | snippet re | ||||||
| 	repeat{ | 	repeat{ | ||||||
| 	  ${2:} | 	  ${2:} | ||||||
| 	  if(${1:condition}) break | 	  if($1) break | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| # matrix | # matrix | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| # rst | # rst | ||||||
|  |  | ||||||
| snippet : | snippet : | ||||||
| 	:${1:field name}: ${0:field body} | 	:${1:field name}: $0 | ||||||
| snippet * | snippet * | ||||||
| 	*${1:Emphasis}* ${0} | 	*${1:Emphasis}* ${0} | ||||||
| snippet ** | snippet ** | ||||||
|  | |||||||
| @ -34,11 +34,11 @@ snippet # | |||||||
| 	# => | 	# => | ||||||
| snippet case | snippet case | ||||||
| 	case ${1:object} | 	case ${1:object} | ||||||
| 	when ${2:condition} | 	when $2 | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet when | snippet when | ||||||
| 	when ${1:condition} | 	when $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet def | snippet def | ||||||
| 	def ${1:method_name} | 	def ${1:method_name} | ||||||
| @ -55,46 +55,46 @@ snippet descendants | |||||||
| 		end | 		end | ||||||
| 	end | 	end | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet eif | snippet eif | ||||||
| 	elsif ${1:condition} | 	elsif $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet ifee | snippet ifee | ||||||
| 	if ${1:condition} | 	if $1 | ||||||
| 		$2 | 		$2 | ||||||
| 	elsif ${3:condition} | 	elsif $3 | ||||||
| 		$4 | 		$4 | ||||||
| 	else | 	else | ||||||
| 		$0 | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet unless | snippet unless | ||||||
| 	unless ${1:condition} | 	unless $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet unlesse | snippet unlesse | ||||||
| 	unless ${1:condition} | 	unless $1 | ||||||
| 		$2 | 		$2 | ||||||
| 	else | 	else | ||||||
| 		$0 | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet unlesee | snippet unlesee | ||||||
| 	unless ${1:condition} | 	unless $1 | ||||||
| 		$2 | 		$2 | ||||||
| 	elsif ${3:condition} | 	elsif $3 | ||||||
| 		$4 | 		$4 | ||||||
| 	else | 	else | ||||||
| 		$0 | 		$0 | ||||||
| 	end | 	end | ||||||
| snippet wh | snippet wh | ||||||
| 	while ${1:condition} | 	while $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet for | snippet for | ||||||
| @ -102,7 +102,7 @@ snippet for | |||||||
| 		${0} | 		${0} | ||||||
| 	end | 	end | ||||||
| snippet until | snippet until | ||||||
| 	until ${1:condition} | 	until $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	end | 	end | ||||||
| snippet cla class .. end | snippet cla class .. end | ||||||
|  | |||||||
| @ -147,7 +147,7 @@ snippet loop "loop {}" b | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet wh "while loop" | snippet wh "while loop" | ||||||
| 	while ${1:condition} { | 	while $1 { | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	} | 	} | ||||||
| snippet whl "while let (...)" | snippet whl "while let (...)" | ||||||
|  | |||||||
| @ -13,15 +13,15 @@ snippet fun | |||||||
| 	@function ${1:name}(${2:args}) | 	@function ${1:name}(${2:args}) | ||||||
| 		${0} | 		${0} | ||||||
| snippet if | snippet if | ||||||
| 	@if ${1:condition} | 	@if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet ife | snippet ife | ||||||
| 	@if ${1:condition} | 	@if $1 | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	@else | 	@else | ||||||
| 		${0} | 		${0} | ||||||
| snippet eif | snippet eif | ||||||
| 	@else if ${1:condition} | 	@else if $1 | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet for | snippet for | ||||||
| 	@for ${1:$i} from ${2:1} through ${3:3} | 	@for ${1:$i} from ${2:1} through ${3:3} | ||||||
|  | |||||||
| @ -17,17 +17,17 @@ snippet fun | |||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet if | snippet if | ||||||
| 	@if ${1:condition} { | 	@if $1 { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet ife | snippet ife | ||||||
| 	@if ${1:condition} { | 	@if $1 { | ||||||
| 		${2} | 		${2} | ||||||
| 	} @else { | 	} @else { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet eif | snippet eif | ||||||
| 	@else if ${1:condition} { | 	@else if $1 { | ||||||
| 		${0} | 		${0} | ||||||
| 	} | 	} | ||||||
| snippet for | snippet for | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| # Shebang. Executing bash via /usr/bin/env makes scripts more portable. | # Shebang | ||||||
| snippet #! | snippet #! | ||||||
| 	#!/usr/bin/env sh | 	#!/bin/sh | ||||||
|  |  | ||||||
| snippet s#! | snippet s#! | ||||||
| 	#!/usr/bin/env sh | 	#!/bin/sh | ||||||
| 	set -eu | 	set -eu | ||||||
|  |  | ||||||
| snippet safe | snippet safe | ||||||
| @ -18,11 +18,11 @@ snippet sbash | |||||||
| 	IFS=$'\n\t' | 	IFS=$'\n\t' | ||||||
|  |  | ||||||
| snippet if | snippet if | ||||||
| 	if [[ ${1:condition} ]]; then | 	if [ $1 ]; then | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	fi | 	fi | ||||||
| snippet elif | snippet elif | ||||||
| 	elif [[ ${1:condition} ]]; then | 	elif [ $1 ]; then | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet for | snippet for | ||||||
| 	for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do | 	for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do | ||||||
| @ -33,11 +33,15 @@ snippet fori | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet wh | snippet wh | ||||||
| 	while [[ ${1:condition} ]]; do | 	while [ $1 ]; do | ||||||
|  | 		${0:${VISUAL}} | ||||||
|  | 	done | ||||||
|  | snippet wht | ||||||
|  | 	while true; do | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet until | snippet until | ||||||
| 	until [[ ${1:condition} ]]; do | 	until [ $1 ]; do | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet case | snippet case | ||||||
| @ -97,10 +101,10 @@ snippet root | |||||||
|  |  | ||||||
| snippet fun-sh | snippet fun-sh | ||||||
| 	${1:function_name}() { | 	${1:function_name}() { | ||||||
| 		${0:#function_body} | 		$0 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| snippet fun | snippet fun | ||||||
| 	function ${1:function_name}() { | 	function ${1:function_name}() { | ||||||
| 		${0:#function_body} | 		$0 | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -6,6 +6,27 @@ snippet dcl \documentclass{} | |||||||
| #documentclass with options | #documentclass with options | ||||||
| snippet dclo \documentclass[]{} | snippet dclo \documentclass[]{} | ||||||
| 	\\documentclass[${1:options}]{${2:class}} ${0} | 	\\documentclass[${1:options}]{${2:class}} ${0} | ||||||
|  |  | ||||||
|  | snippet tmplt "Template" | ||||||
|  | 	\\documentclass{${1:article}} | ||||||
|  |  | ||||||
|  | 	\\usepackage{import} | ||||||
|  | 	\\usepackage{pdfpages} | ||||||
|  | 	\\usepackage{transparent} | ||||||
|  | 	\\usepackage{xcolor} | ||||||
|  | 	$2 | ||||||
|  | 	 | ||||||
|  | 	\\newcommand{\incfig}[2][1]{% | ||||||
|  | 		    \def\svgwidth{#1\columnwidth} | ||||||
|  | 		    \import{./figures/}{#2.pdf_tex} | ||||||
|  | 	} | ||||||
|  | 	$3 | ||||||
|  | 	\\pdfsuppresswarningpagegroup=1 | ||||||
|  | 	 | ||||||
|  | 	\\begin{document} | ||||||
|  | 		    $0 | ||||||
|  | 	\\end{document} | ||||||
|  |  | ||||||
| #newcommand | #newcommand | ||||||
| snippet nc \newcommand | snippet nc \newcommand | ||||||
| 	\\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0} | 	\\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}} ${0} | ||||||
|  | |||||||
| @ -144,7 +144,7 @@ snippet yrp | |||||||
| #----------------Yii Model----------------------------- | #----------------Yii Model----------------------------- | ||||||
| #Yii Model count | #Yii Model count | ||||||
| snippet ycountm | snippet ycountm | ||||||
| 	${1:ModelName}::model()->count(${2:condition}, array('${3:key}'=>${0:value})); | 	${1:ModelName}::model()->count($2, array('${3:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model countBySql | #Yii Model countBySql | ||||||
| snippet ycountbs | snippet ycountbs | ||||||
| @ -152,35 +152,35 @@ snippet ycountbs | |||||||
|  |  | ||||||
| #Yii Model updateAll | #Yii Model updateAll | ||||||
| snippet yupdatea | snippet yupdatea | ||||||
| 	${1:ModelName}::model()->updateAll(${2:array('attributes')}, ${3:condition},array('${4:key}'=>${0:value})); | 	${1:ModelName}::model()->updateAll(${2:array('attributes')}, $3,array('${4:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model updateByPk | #Yii Model updateByPk | ||||||
| snippet yupdatebp | snippet yupdatebp | ||||||
| 	${1:ModelName}::model()->updateByPk(${2:pk}, ${3:array('attributes')}, ${4:condition},array('${5:key}'=>${0:value})); | 	${1:ModelName}::model()->updateByPk(${2:pk}, ${3:array('attributes')}, $4,array('${5:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model deleteAll | #Yii Model deleteAll | ||||||
| snippet ydela | snippet ydela | ||||||
| 	${1:ModelName}::model()->deleteAll(${2:condition},array('${3:key}'=>${0:value})); | 	${1:ModelName}::model()->deleteAll($2,array('${3:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model deleteByPk | #Yii Model deleteByPk | ||||||
| snippet ydelbp | snippet ydelbp | ||||||
| 	${1:ModelName}::model()->deleteByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${0:value})); | 	${1:ModelName}::model()->deleteByPk(${2:pk}, $3, array('${4:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model find | #Yii Model find | ||||||
| snippet yfind | snippet yfind | ||||||
| 	${1:ModelName}::model()->find(${2:condition},array('${3:key}'=>${0:value})); | 	${1:ModelName}::model()->find($2,array('${3:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model findAll | #Yii Model findAll | ||||||
| snippet yfinda | snippet yfinda | ||||||
| 	${1:ModelName}::model()->findAll(${2:condition},array('${3:key}'=>${0:value})); | 	${1:ModelName}::model()->findAll($2,array('${3:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model findByPk | #Yii Model findByPk | ||||||
| snippet yfindbp | snippet yfindbp | ||||||
| 	${1:ModelName}::model()->findByPk(${2:pk}, ${3:condition}, array('${4:key}'=>${0:value})); | 	${1:ModelName}::model()->findByPk(${2:pk}, $3, array('${4:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model findAllByPk | #Yii Model findAllByPk | ||||||
| snippet yfindabp | snippet yfindabp | ||||||
| 	${1:ModelName}::model()->findAllByPk(${2:pk}, ${3:condition},array('${4:key}'=>${0:value})); | 	${1:ModelName}::model()->findAllByPk(${2:pk}, $3,array('${4:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model findBySql | #Yii Model findBySql | ||||||
| snippet yfindbs | snippet yfindbs | ||||||
| @ -188,11 +188,11 @@ snippet yfindbs | |||||||
|  |  | ||||||
| #Yii Model findAllByAttributes | #Yii Model findAllByAttributes | ||||||
| snippet yfindaba | snippet yfindaba | ||||||
| 	${1:ModelName}::model()->findAllByAttributes(array('${2:attributeName}'=>${3:attributeValue}), ${4:condition}, array('${5:key}'=>${0:value})); | 	${1:ModelName}::model()->findAllByAttributes(array('${2:attributeName}'=>${3:attributeValue}), $4, array('${5:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Model exists | #Yii Model exists | ||||||
| snippet yexists | snippet yexists | ||||||
| 	${1:ModelName}::model()->exists(${2:condition}, array('${3:key}'=>${0:value})); | 	${1:ModelName}::model()->exists($2, array('${3:key}'=>${0:value})); | ||||||
|  |  | ||||||
| #Yii Create model class | #Yii Create model class | ||||||
| snippet ymodel | snippet ymodel | ||||||
|  | |||||||
| @ -1,19 +1,21 @@ | |||||||
| # #!/bin/zsh | # #!/bin/zsh | ||||||
|  | extends bash | ||||||
|  |  | ||||||
| snippet #! | snippet #! | ||||||
| 	#!/bin/zsh | 	#!/usr/bin/env zsh | ||||||
|  |  | ||||||
| snippet if | snippet if | ||||||
| 	if ${1:condition}; then | 	if $1; then | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	fi | 	fi | ||||||
| snippet ife | snippet ife | ||||||
| 	if ${1:condition}; then | 	if $1; then | ||||||
| 		${2:${VISUAL}} | 		${2:${VISUAL}} | ||||||
| 	else | 	else | ||||||
| 		${0:# statements} | 		${0:# statements} | ||||||
| 	fi | 	fi | ||||||
| snippet eif | snippet eif | ||||||
| 	elif ${1:condition}; then | 	elif $1; then | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| snippet for | snippet for | ||||||
| 	for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do | 	for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do | ||||||
| @ -28,11 +30,11 @@ snippet fore | |||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet wh | snippet wh | ||||||
| 	while ${1:condition}; do | 	while $1; do | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet until | snippet until | ||||||
| 	until ${1:condition}; do | 	until $1; do | ||||||
| 		${0:${VISUAL}} | 		${0:${VISUAL}} | ||||||
| 	done | 	done | ||||||
| snippet repeat | snippet repeat | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Amir
					Amir