diff --git a/SpaceVim.d/autoload/UltiSnips/javascript.snippets b/SpaceVim.d/autoload/UltiSnips/javascript.snippets deleted file mode 100644 index d0f99bd..0000000 --- a/SpaceVim.d/autoload/UltiSnips/javascript.snippets +++ /dev/null @@ -1,84 +0,0 @@ -snippet reactConnectedRoute "React template" b -import React from 'react' -import { connect } from 'react-redux' -import { isLogin } from 'utils/self' -import { Redirect, Route } from 'react-router-dom' - -export default connect((state, ownProps) => { - const { self } = state - return { self } -})(({ component: Component, ...rest }) => { - const { self } = rest - return isLogin(self) ? : - } - /> -}) -endsnippet - -snippet reactComponent "React template" b -import React, { Component } from 'react' - -export default class extends Component { - render () { - } -} -endsnippet - -snippet reactConnect "React template" b -import component from './component' -import { connect } from 'react-redux' - -export default connect((state, ownProps) => ({ -}), { -})(component) -endsnippet - -snippet TODO "Javascript Todo" b -// TODO: ${1:desc} `echo $USER` `!v strftime("%c")` ${2} -endsnippet - -snippet connect "react redux connect" b -export default connect((state, ownProps) => { - return { - } -})($1) -endsnippet - -snippet Card "Default Expandable Card" b - - - - - - - - -endsnippet - -snippet redux "redux" b -export const SET_${1/\w/\u$0/g} = 'SET_${1/\w/\u$0/g}' -import {store} from 'redux/store' -import {Map} from 'immutable' -export default function (${1} = Map({}), action) { - // let {$1Id} = action - switch (action.type) { - case SET_${1/\w/\u$0/g}: - return action.$1 - default: - return $1 - } -} - -export function set${1/\w+\s*/\u$0/} ($1) { - store.dispatch({ - type: SET_${1/\w/\u$0/g}, - $1 - }) -} -endsnippet diff --git a/SpaceVim.d/autoload/UltiSnips/sh.snippets b/SpaceVim.d/autoload/UltiSnips/sh.snippets deleted file mode 100644 index 08ce07a..0000000 --- a/SpaceVim.d/autoload/UltiSnips/sh.snippets +++ /dev/null @@ -1,42 +0,0 @@ -snippet options "bash command options" b -while true; do - case "\$1" in - -a | --asset ) - ASSET=true; shift ;; - -e | --environment ) - case "\$2" in - "production" | "development") - RAILS_ENV=$\2 - ACCOUNT_ROOT=http://account.rallets.com/ - SERVER_ROOT=http://rallets.com/ - shift 2 - ;; - *) - RAILS_ENV=development - ACCOUNT_ROOT=http://account.rallets.com/ - SERVER_ROOT=http://apitest.rallets.com/ - shift 2 - ;; - esac - ;; - -d | --delayed-job ) - DELAYED_JOB=true; shift ;; - -- ) shift; break ;; - -h | --help ) - echo "usage: - [-a | --asset] precompile assets - [-d | --delayed-job] run delayed job for queuing sending emails - [-e | --environment] provides environment which rails will run in - [-h | --help] view manual -" - exit;; - * ) break ;; - esac -done -endsnippet -snippet OS "Determine whether it's Mac/Linux/Windows" b -if [ "$(uname)" == "Darwin" ]; then -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then -elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then -fi -endsnippet diff --git a/SpaceVim.d/autoload/UltiSnips/sshconfig.snippets b/SpaceVim.d/autoload/UltiSnips/sshconfig.snippets deleted file mode 100644 index b147299..0000000 --- a/SpaceVim.d/autoload/UltiSnips/sshconfig.snippets +++ /dev/null @@ -1,6 +0,0 @@ -snippet Host "Description" b -Host ${1} - Hostname ${2} - IdentityFile ~/.ssh/rallets - User root -endsnippet diff --git a/SpaceVim.d/autoload/UltiSnips/zsh.snippets b/SpaceVim.d/autoload/UltiSnips/zsh.snippets deleted file mode 100644 index 80c13ef..0000000 --- a/SpaceVim.d/autoload/UltiSnips/zsh.snippets +++ /dev/null @@ -1,18 +0,0 @@ -snippet getopts "Deal with shell parameters" b -BOOL=false -VAVLUE='' -while getopts ":bv:" o; do - case "${o}" in - b) - BOOL=true - ;; - v) - VALUE=${OPTARG} - ;; - *) - echo "Usage: $1 [-b] [-v VALUE]" - return - ;; - esac -done -endsnippet diff --git a/SpaceVim.d/autoload/paiyou.vim b/SpaceVim.d/autoload/paiyou.vim index 0e6c482..8f24e26 100644 --- a/SpaceVim.d/autoload/paiyou.vim +++ b/SpaceVim.d/autoload/paiyou.vim @@ -13,8 +13,6 @@ let vimsettings = '~/.yadr/SpaceVim.d/autoload/settings' let uname = system("uname -s") for fpath in split(globpath(vimsettings, '*.vim'), '\n') - echom fpath - if (fpath == expand(vimsettings) . "/yadr-keymap-mac.vim") && uname[:4] ==? "linux" continue " skip mac mappings for linux endif diff --git a/SpaceVim.d/autoload/settings/neosnippet.vim b/SpaceVim.d/autoload/settings/neosnippet.vim new file mode 100644 index 0000000..899841e --- /dev/null +++ b/SpaceVim.d/autoload/settings/neosnippet.vim @@ -0,0 +1,19 @@ +" Plugin key-mappings. +" Note: It must be "imap" and "smap". It uses mappings. +imap (neosnippet_expand_or_jump) +smap (neosnippet_expand_or_jump) +xmap (neosnippet_expand_target) + +" SuperTab like snippets behavior. +" Note: It must be "imap" and "smap". It uses mappings. +"imap +" \ pumvisible() ? "\" : +" \ neosnippet#expandable_or_jumpable() ? +" \ "\(neosnippet_expand_or_jump)" : "\" +smap neosnippet#expandable_or_jumpable() ? +\ "\(neosnippet_expand_or_jump)" : "\" + +" For conceal markers. +if has('conceal') + set conceallevel=2 concealcursor=niv +endif diff --git a/SpaceVim.d/autoload/settings/out_of_usage/settings.vim b/SpaceVim.d/autoload/settings/out_of_usage/settings.vim deleted file mode 100644 index 81c3141..0000000 --- a/SpaceVim.d/autoload/settings/out_of_usage/settings.vim +++ /dev/null @@ -1,15 +0,0 @@ -let vimsettings = '~/.vim/settings' -let uname = system("uname -s") - -for fpath in split(globpath(vimsettings, '*.vim'), '\n') - - if (fpath == expand(vimsettings) . "/yadr-keymap-mac.vim") && uname[:4] ==? "linux" - continue " skip mac mappings for linux - endif - - if (fpath == expand(vimsettings) . "/yadr-keymap-linux.vim") && uname[:4] !=? "linux" - continue " skip linux mappings for mac - endif - - exe 'source' fpath -endfor diff --git a/SpaceVim.d/autoload/settings/yadr-keymap.vim b/SpaceVim.d/autoload/settings/yadr-keymap.vim index 485da58..ab1615e 100644 --- a/SpaceVim.d/autoload/settings/yadr-keymap.vim +++ b/SpaceVim.d/autoload/settings/yadr-keymap.vim @@ -1,4 +1,3 @@ -echom 'shit' " ======================================== " General vim sanity improvements " ======================================== diff --git a/SpaceVim.d/snippets/sh.snip b/SpaceVim.d/snippets/sh.snip new file mode 100644 index 0000000..3460e6b --- /dev/null +++ b/SpaceVim.d/snippets/sh.snip @@ -0,0 +1,7 @@ +snippet OS +options head +abbr determine OS type(Mac/Linux/Windows) + if [ "$(uname)" == "Darwin" ]; then + elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then + fi