mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -58,6 +58,14 @@ snippet queue
|
||||
snippet pqueue
|
||||
std::priority_queue<${1:T}> ${2};
|
||||
##
|
||||
## STL smart pointers
|
||||
# std::shared_ptr
|
||||
snippet msp
|
||||
std::shared_ptr<${1:T}> ${2} = std::make_shared<$1>(${3});
|
||||
# std::unique_ptr
|
||||
snippet mup
|
||||
std::unique_ptr<${1:T}> ${2} = std::make_unique<$1>(${3});
|
||||
##
|
||||
## Access Modifiers
|
||||
# private
|
||||
snippet pri
|
||||
|
@ -58,7 +58,7 @@ snippet doc
|
||||
-}
|
||||
snippet p
|
||||
|> ${0}
|
||||
snippet program
|
||||
snippet program Elm 0.18 program
|
||||
import Html exposing (Html)
|
||||
|
||||
|
||||
@ -100,3 +100,57 @@ snippet program
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
Html.text "Hello, sailor!"
|
||||
snippet element
|
||||
module Main exposing (Model, Msg(..), init, main, subscriptions, update, view)
|
||||
|
||||
import Browser
|
||||
import Html exposing (..)
|
||||
import Json.Encode
|
||||
|
||||
|
||||
main : Program Flags Model Msg
|
||||
main =
|
||||
Browser.element
|
||||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view
|
||||
}
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
type alias Flags =
|
||||
Json.Encode.Value
|
||||
|
||||
|
||||
init : Flags -> ( Model, Cmd Msg )
|
||||
init flags_ =
|
||||
( {}
|
||||
, Cmd.none
|
||||
)
|
||||
|
||||
|
||||
type Msg
|
||||
= Noop
|
||||
|
||||
|
||||
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||
update msg model =
|
||||
case msg of
|
||||
Noop ->
|
||||
( model
|
||||
, Cmd.none
|
||||
)
|
||||
|
||||
|
||||
subscriptions : Model -> Sub Msg
|
||||
subscriptions model =
|
||||
Sub.none
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
h1 [] [ text "Hello, world!" ]
|
||||
|
27
sources_non_forked/vim-snippets/snippets/freemarker.snippets
Normal file
27
sources_non_forked/vim-snippets/snippets/freemarker.snippets
Normal file
@ -0,0 +1,27 @@
|
||||
extends html
|
||||
|
||||
snippet assign
|
||||
<#assign ${1} = ${0:${VISUAL}} />
|
||||
|
||||
snippet if
|
||||
<#if ${1}>
|
||||
${0:${VISUAL}}
|
||||
</#if>
|
||||
|
||||
snippet ife
|
||||
<#if ${1}>
|
||||
${2:${VISUAL}}
|
||||
<#else>
|
||||
${0}
|
||||
</#if>
|
||||
|
||||
snippet list
|
||||
<#list ${1} as ${2}>
|
||||
${0:${VISUAL}}
|
||||
</#list>
|
||||
|
||||
snippet attempt
|
||||
<#attempt>
|
||||
${0:${VISUAL}}
|
||||
<#recover>
|
||||
</#attempt>
|
@ -257,3 +257,8 @@ snippet ja
|
||||
func (p *$1) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(&struct{ *$1Alias }{(*$1Alias)(p)})
|
||||
}
|
||||
|
||||
snippet errwr # Error handling with errors.Wrap
|
||||
if ${1}err != nil {
|
||||
return errors.Wrap(err, "${2}")
|
||||
}
|
||||
|
39
sources_non_forked/vim-snippets/snippets/ocaml.snippets
Normal file
39
sources_non_forked/vim-snippets/snippets/ocaml.snippets
Normal file
@ -0,0 +1,39 @@
|
||||
snippet doc
|
||||
(*
|
||||
${0}
|
||||
*)
|
||||
snippet let
|
||||
let ${1} = ${2} in
|
||||
${0}
|
||||
snippet fn
|
||||
let ${1} =
|
||||
${0}
|
||||
snippet fun
|
||||
type ${1} = ${0}
|
||||
snippet mod
|
||||
module ${1} = struct
|
||||
${0}
|
||||
end
|
||||
snippet modty
|
||||
module type ${1} = sig
|
||||
${0}
|
||||
end
|
||||
snippet sw
|
||||
match ${1} with
|
||||
| ${2} -> ${0}
|
||||
snippet |
|
||||
| ${1} -> ${0}
|
||||
snippet p
|
||||
|> ${0}
|
||||
snippet if
|
||||
if ${1} then
|
||||
${2}
|
||||
else
|
||||
${0}
|
||||
snippet fnr
|
||||
let rec ${1} =
|
||||
${0}
|
||||
snippet try
|
||||
try
|
||||
${1}
|
||||
with ${0}
|
72
sources_non_forked/vim-snippets/snippets/racket.snippets
Normal file
72
sources_non_forked/vim-snippets/snippets/racket.snippets
Normal file
@ -0,0 +1,72 @@
|
||||
snippet #r
|
||||
#lang racket
|
||||
snippet #tr
|
||||
#lang typed/racket
|
||||
snippet #rg
|
||||
#lang racket/gui
|
||||
snippet #sb
|
||||
#lang scribble/base
|
||||
snippet #d
|
||||
#lang datalog
|
||||
snippet #wi
|
||||
#lang web-server/insta
|
||||
snippet def
|
||||
(define ${1} ${0})
|
||||
snippet defun
|
||||
(define (${1})
|
||||
${0})
|
||||
snippet if
|
||||
(if ${1} ${2} ${0})
|
||||
snippet ifn
|
||||
(if (not ${1}) ${2} {0})
|
||||
snippet ifl
|
||||
(if ${1}
|
||||
(let ()
|
||||
${2})
|
||||
${0})
|
||||
snippet ifnl
|
||||
(if (not ${1})
|
||||
(let ()
|
||||
${2})
|
||||
${0})
|
||||
snippet when
|
||||
(when ${1}
|
||||
${0})
|
||||
snippet cond
|
||||
(cond
|
||||
[(${1})
|
||||
${0}])
|
||||
snippet case
|
||||
(case ${1}
|
||||
[(${2})
|
||||
${0}])
|
||||
snippet match
|
||||
(match ${1}
|
||||
[(${2})
|
||||
${0}])
|
||||
snippet letcc
|
||||
(let/cc here (set! ${1} here) ${0})
|
||||
snippet for
|
||||
(for ([${1} ${2}])
|
||||
${0})
|
||||
snippet req
|
||||
(require ${0})
|
||||
snippet unless
|
||||
(unless ${1} ${2} ${0})
|
||||
snippet let
|
||||
(let ([${1}]) ${0})
|
||||
snippet begin
|
||||
(begin
|
||||
${0})
|
||||
snippet lambda
|
||||
(lambda (${1}) ${0})
|
||||
snippet ifb
|
||||
(if ${1}
|
||||
(begin
|
||||
${2})
|
||||
${0})
|
||||
snippet ifnb
|
||||
(if (not ${1})
|
||||
(begin
|
||||
${2})
|
||||
${0})
|
@ -1,17 +1,17 @@
|
||||
snippet +
|
||||
(+ ${1}
|
||||
(+ ${1}
|
||||
${0})
|
||||
|
||||
snippet -
|
||||
(- ${1}
|
||||
(- ${1}
|
||||
${0})
|
||||
|
||||
snippet /
|
||||
(/ ${1}
|
||||
(/ ${1}
|
||||
${0})
|
||||
|
||||
snippet *
|
||||
(* ${1}
|
||||
(* ${1}
|
||||
${0})
|
||||
|
||||
# Definition
|
||||
@ -22,12 +22,12 @@ snippet def
|
||||
# Definition with lambda
|
||||
snippet defl
|
||||
(define ${1:name}
|
||||
(lambda (x)(${0:definition})))
|
||||
(lambda (x)(${0:definition})))
|
||||
|
||||
# Condition
|
||||
snippet cond
|
||||
(cond ((${1:predicate}) (${2:action}))
|
||||
((${3:predicate}) (${0:action})))
|
||||
(cond ((${1:predicate}) (${2:action}))
|
||||
((${3:predicate}) (${0:action})))
|
||||
|
||||
# If statement
|
||||
snippet if
|
||||
|
@ -119,53 +119,53 @@ snippet spl split environment
|
||||
\\end{split}
|
||||
# Part
|
||||
snippet part document \part
|
||||
\\part{${1:part name}} % (fold)
|
||||
\\part{${1:part name}} % (fold)%
|
||||
\\label{prt:${2:$1}}
|
||||
${0}
|
||||
% part $2 (end)
|
||||
# Chapter
|
||||
snippet cha \chapter
|
||||
\\chapter{${1:chapter name}}
|
||||
\\chapter{${1:chapter name}}%
|
||||
\\label{cha:${2:$1}}
|
||||
${0}
|
||||
# Section
|
||||
snippet sec \section
|
||||
\\section{${1:section name}}
|
||||
\\section{${1:section name}}%
|
||||
\\label{sec:${2:$1}}
|
||||
${0}
|
||||
# Section without number
|
||||
snippet sec* \section*
|
||||
\\section*{${1:section name}}
|
||||
\\section*{${1:section name}}%
|
||||
\\label{sec:${2:$1}}
|
||||
${0}
|
||||
# Sub Section
|
||||
snippet sub \subsection
|
||||
\\subsection{${1:subsection name}}
|
||||
\\subsection{${1:subsection name}}%
|
||||
\\label{sub:${2:$1}}
|
||||
${0}
|
||||
# Sub Section without number
|
||||
snippet sub* \subsection*
|
||||
\\subsection*{${1:subsection name}}
|
||||
\\subsection*{${1:subsection name}}%
|
||||
\\label{sub:${2:$1}}
|
||||
${0}
|
||||
# Sub Sub Section
|
||||
snippet ssub \subsubsection
|
||||
\\subsubsection{${1:subsubsection name}}
|
||||
\\subsubsection{${1:subsubsection name}}%
|
||||
\\label{ssub:${2:$1}}
|
||||
${0}
|
||||
# Sub Sub Section without number
|
||||
snippet ssub* \subsubsection*
|
||||
\\subsubsection*{${1:subsubsection name}}
|
||||
\\subsubsection*{${1:subsubsection name}}%
|
||||
\\label{ssub:${2:$1}}
|
||||
${0}
|
||||
# Paragraph
|
||||
snippet par \paragraph
|
||||
\\paragraph{${1:paragraph name}}
|
||||
\\paragraph{${1:paragraph name}}%
|
||||
\\label{par:${2:$1}}
|
||||
${0}
|
||||
# Sub Paragraph
|
||||
snippet subp \subparagraph
|
||||
\\subparagraph{${1:subparagraph name}}
|
||||
\\subparagraph{${1:subparagraph name}}%
|
||||
\\label{subp:${2:$1}}
|
||||
${0}
|
||||
snippet ni \noindent
|
||||
|
Reference in New Issue
Block a user