mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-13 15:29:10 +08:00
Merge branch 'improve_lang/java' into update_doc
This commit is contained in:
commit
51f0a0ed84
11
README.md
11
README.md
@ -6,9 +6,13 @@
|
||||
[](doc/SpaceVim.txt)
|
||||
[](https://jq.qq.com/?_wv=1027&k=43DB6SG)
|
||||
[](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://twitter.com/SpaceVim)
|
||||
[](https://www.facebook.com/SpaceVim)
|
||||
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://twitter.com/SpaceVim)
|
||||
|
||||

|
||||
|
||||
[SpaceVim](https://github.com/SpaceVim/SpaceVim) is a Modular configuration, a bundle of custom settings and plugins for Vim,
|
||||
@ -151,7 +155,10 @@ unite work flow leader can only be used in normal mode. unite leader need unite
|
||||
#### Unite centric work-flow
|
||||
- List all the plugins has been installed, fuzzy find what you want,
|
||||
default action is open the github website of current plugin. default key is `<leader>lp`
|
||||

|
||||
|
||||
[layer name] [plugin name] [load type] [plugin options]
|
||||
|
||||

|
||||
|
||||
- List all the mappings and description: `f<space>`
|
||||

|
||||
|
167
README_zh_cn.md
Normal file
167
README_zh_cn.md
Normal file
@ -0,0 +1,167 @@
|
||||
<p align="center"><img src="logo.jpg" alt="SpaceVim"/></p>
|
||||
|
||||
[](https://travis-ci.org/SpaceVim/SpaceVim)
|
||||

|
||||
[](LICENSE)
|
||||
[](doc/SpaceVim.txt)
|
||||
[](https://jq.qq.com/?_wv=1027&k=43DB6SG)
|
||||
[](https://gitter.im/SpaceVim/SpaceVim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://www.facebook.com/SpaceVim)
|
||||
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://github.com/SpaceVim/SpaceVim)
|
||||
[](https://twitter.com/SpaceVim)
|
||||
|
||||

|
||||
|
||||
|
||||
项 目 主 页: [spacevim.org](https://spacevim.org)
|
||||
|
||||
Github 地址 : [SpaceVim/SpaceVim](https://github.com/SpaceVim/SpaceVim), 欢迎Star或fork,感谢支持! 使用过程中遇到问题在github提交issue将更容易被关注和修复。我们也欢迎喜欢vim的用户加入我们的QQ群,一起讨论vim相关的技巧,[点击加入Vim/SpaceVim用户群](https://jq.qq.com/?_wv=1027&k=43zWPlT)。
|
||||
|
||||
SpaceVim 是一个模块化配置集合,包含针对各种语言开发的插件和相应的优化配置。目前支持多种语言的自动补全、语法检测、代码格式化,而且启动速度飞快。SpaceVim的另一核心理念就是按序延迟加载,目前90%的插件都是滞后加载。SpaceVim模块化的思想来源于 spacemacs的layer(模块),将各种功能包装好封装成一个layer,用户根据自己的需要载入相应的layer,实现自定义SpaceVim。
|
||||
|
||||
SpaceVim对于新手有着非常友好的界面,界面格局和大多数IDE也比较类似。不过为了更好的体验SpaceVim,建议对于vim需要有一定的了解,如果有一定的英语基础建议阅读这篇关于vim的教程 vim-galore.
|
||||
|
||||
### 安装
|
||||
|
||||
#### Linux 或 Mac 下 SpaceVim的安装非常简单,只需要执行以下命令即可:
|
||||
```sh
|
||||
curl -sLf https://spacevim.org/install.sh | bash
|
||||
```
|
||||
想要获取更多的自定义的安装方式,请参考:
|
||||
```sh
|
||||
curl -sLf https://spacevim.org/install.sh | bash -s -- -h
|
||||
```
|
||||
在初次使用SpaceVim的时候,当你打开vim时,SpaceVim会下载需要的插件,请等待下载过程完成,如果有失败的,可以手动执行 :
|
||||
```viml
|
||||
:call dein#install()
|
||||
```
|
||||
SpaceVim是一种模块化配置,可以运行在vim或者neovim上,关于vim以及neovim的安装,请参考以下链接:
|
||||
|
||||
[安装neovim](https://github.com/neovim/neovim/wiki/Installing-Neovim)
|
||||
|
||||
[从源码编译vim](https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source)
|
||||
|
||||
#### windows系统下的安装步骤:
|
||||
|
||||
Windows 下 vim 用户只需要将本仓库克隆到用户 HOME 目录下的 vimfiles 即可,打开 CMD 默认的目录默认即为 HOME 目录,只需要执行如下命令即可:
|
||||
```sh
|
||||
git clone https://github.com/SpaceVim/SpaceVim.git vimfiles
|
||||
```
|
||||
Windows 下 neovim 用户 需要将本仓库克隆到用户 HOME 目录下的 AppData\Local\nvim,想要获取跟多关于 neovim 安装相关的知识,可以访问 neovim 的 wiki, wiki 写的非常详细。打开 CMD 初始目录默认一般即为 HOME 目录,只需要执行如下命令即可:
|
||||
```sh
|
||||
git clone https://github.com/SpaceVim/SpaceVim.git AppData\Local\nvim
|
||||
```
|
||||
### 特性
|
||||
|
||||
以neovim为主的新特性实现
|
||||
模块化设置
|
||||
依赖 dein.vim 的延迟加载,90%插件延迟加载,启动速度极快
|
||||
高效,轻量级
|
||||
Unite为主的工作平台
|
||||
优雅的界面
|
||||
针对不同语言开发的优化
|
||||
可扩展的补全引擎,vim下为neocomplete, neovim 下为 deoplete
|
||||
细致的tags管理
|
||||
轻量级状态栏
|
||||
优雅的主题
|
||||
|
||||
### 文件结构
|
||||
|
||||
- [config](./config)/ - Configuration
|
||||
- [plugins](./config/plugins)/ - Plugin configurations
|
||||
- [mappings.vim](./config/mappings.vim) - Key mappings
|
||||
- [autocmds.vim](./config/autocmds.vim) - autocmd group
|
||||
- [general.vim](./config/general.vim) - General configuration
|
||||
- [init.vim](./config/init.vim) - `runtimepath` initialization
|
||||
- [neovim.vim](./config/neovim.vim) - Neovim specific setup
|
||||
- [plugins.vim](./config/plugins.vim) - Plugin bundles
|
||||
- [commands.vim](./config/commands.vim) - Commands
|
||||
- [functions.vim](./config/functions.vim) - Functions
|
||||
- [main.vim](./config/main.vim) - Main config
|
||||
- [ftplugin](./ftplugin)/ - Language specific custom settings
|
||||
- [snippets](../../snippets)/ - Code snippets
|
||||
- [filetype.vim](./filetype.vim) - Custom filetype detection
|
||||
- [init.vim](./init.vim) - Sources `config/main.vim`
|
||||
- [vimrc](./vimrc) - Sources `config/main.vim`
|
||||
|
||||
### 模块化设置
|
||||
|
||||
1. SpaceVim 将从 ~/.local.vim 和当前目录的 .local.vim 载入用户配置,(该方式将被舍弃).
|
||||
2. SpaceVim 将从 ~/.SpaceVim.d/init.vim 和当前目录的 ./SpaceVim.d/init.vim 载入配置,并且更新 rtp,用户可以在 ~/.SpaceVim.d/ 和 .SpaceVim.d/ 这两个文件夹下编辑自己的脚本,和 SpaceVim 的配置文件。
|
||||
|
||||
示例:
|
||||
|
||||
```viml
|
||||
" here are some basic customizations, please refer to the top of the vimrc file for all possible options
|
||||
let g:spacevim_default_indent = 3
|
||||
let g:spacevim_max_column = 80
|
||||
let g:spacevim_colorscheme = 'my_awesome_colorscheme'
|
||||
let g:spacevim_plugin_manager = 'dein' " neobundle or dein or vim-plug
|
||||
|
||||
" change the default directory where all miscellaneous persistent files go
|
||||
let g:spacevim_cache_dir = "/some/place/else"
|
||||
|
||||
" by default, language specific plugins are not loaded. this can be changed with the following:
|
||||
let g:spacevim_plugin_groups_exclude = ['ruby', 'python']
|
||||
|
||||
" if there are groups you want always loaded, you can use this:
|
||||
let g:spacevim_plugin_groups_include = ['go']
|
||||
|
||||
" alternatively, you can set this variable to load exactly what you want
|
||||
let g:spacevim_plugin_groups = ['core', 'web']
|
||||
|
||||
" recommend to use layer function, all the layers's name can be find in `:h SpaceVim-layers`
|
||||
call SpaceVim#layers#load('layer_name')
|
||||
|
||||
" if there is a particular plugin you don't like, you can define this variable to disable them entirely
|
||||
let g:spacevim_disabled_plugins=['vim-foo', 'vim-bar']
|
||||
|
||||
" if you want to add some custom plugins, use this options.
|
||||
let g:spacevim_custom_plugins = [
|
||||
\ ['plasticboy/vim-markdown', 'on_ft' : 'markdown'],
|
||||
\ ['wsdjeg/GitHub.vim'],
|
||||
\ ]
|
||||
|
||||
" anything defined here are simply overrides
|
||||
set backgroud=light
|
||||
set nu
|
||||
|
||||
" but some options need to use spacevim's option, such as:
|
||||
let g:spacevim_guifont = 'DejaVu\ Sans\ Mono\ for\ Powerline\ 11'
|
||||
```
|
||||
|
||||
#### Unite 为主的工作流
|
||||
1. 列出所有插件,并且可以根据输入的字符模糊匹配,回车将打开对应插件的github网站, 这非常便于临时去github上面找文档,默认的启动快捷键是 : `<leader>lp`
|
||||
|
||||
[layer name] [plugin name] [load type] [plugin options]
|
||||
|
||||

|
||||
|
||||
2. 列出所有按键映射以及描述,可以通过输入模糊搜索对应的快捷键,回车即可执行,默认启动该功能的快捷键是: `f<space>`
|
||||
|
||||

|
||||
|
||||
3. 通过 Unite 列出自己在 github 上面所有的 star 的仓库名称以及描述,模糊搜索,回车通过浏览器打开相应的网站,默认的快捷键是 :`<leader>ls`
|
||||
|
||||

|
||||
|
||||
#### 友好的交互界面
|
||||
|
||||
1. 语法树 + 文件管理 + 语法检查
|
||||
|
||||

|
||||
|
||||
#### 已支持的开发语言
|
||||
- java
|
||||
- viml
|
||||
- rust
|
||||
- php
|
||||
- c/c++
|
||||
- js
|
||||
- python
|
||||
- php
|
||||
- lua
|
||||
- javascript
|
@ -9,7 +9,7 @@ function! SpaceVim#autocmds#init() abort
|
||||
\ q | endif
|
||||
autocmd FileType jsp call JspFileTypeInit()
|
||||
autocmd FileType html,css,jsp EmmetInstall
|
||||
autocmd FileType java call JavaFileTypeInit()
|
||||
autocmd BufRead,BufNewFile *.pp setfiletype puppet
|
||||
autocmd BufEnter,WinEnter,InsertLeave * set cursorline
|
||||
autocmd BufLeave,WinLeave,InsertEnter * set nocursorline
|
||||
autocmd BufReadPost *
|
||||
|
@ -94,6 +94,7 @@ function! SpaceVim#default#SetOptions() abort
|
||||
set hidden
|
||||
set ttimeout
|
||||
set ttimeoutlen=50
|
||||
set background=dark
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#default#SetPlugins() abort
|
||||
|
@ -1,5 +1,5 @@
|
||||
function! SpaceVim#layers#chat#plugins() abort
|
||||
return [
|
||||
\ ['Shougo/denite.nvim',{ 'merged' : 0, 'loadconf' : 1}],
|
||||
\ ['vim-chat/vim-chat',{ 'merged' : 0, 'loadconf' : 1}],
|
||||
\ ]
|
||||
endfunction
|
||||
|
@ -1,5 +1,5 @@
|
||||
function! SpaceVim#layers#edit#plugins() abort
|
||||
return [
|
||||
let plugins = [
|
||||
\ ['tpope/vim-surround'],
|
||||
\ ['terryma/vim-multiple-cursors'],
|
||||
\ ['scrooloose/nerdcommenter'],
|
||||
@ -8,8 +8,11 @@ function! SpaceVim#layers#edit#plugins() abort
|
||||
\ ['easymotion/vim-easymotion',{'on_map' : '<Plug>(easymotion-prefix)'}],
|
||||
\ ['editorconfig/editorconfig-vim', { 'on_cmd' : 'EditorConfigReload'}],
|
||||
\ ['floobits/floobits-neovim', { 'on_cmd' : ['FlooJoinWorkspace','FlooShareDirPublic','FlooShareDirPrivate']}],
|
||||
\ ['lilydjwg/fcitx.vim', { 'on_i' : 1}],
|
||||
\ ]
|
||||
if executable('fcitx')
|
||||
call add(plugins,['lilydjwg/fcitx.vim', { 'on_i' : 1}])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#edit#config() abort
|
||||
|
@ -11,13 +11,9 @@ function! SpaceVim#layers#lang#plugins() abort
|
||||
\ ['digitaltoad/vim-jade', { 'on_ft' : ['jade']}],
|
||||
\ ['juvenn/mustache.vim', { 'on_ft' : ['mustache']}],
|
||||
\ ['Valloric/MatchTagAlways', { 'on_ft' : ['html' , 'xhtml' , 'xml' , 'jinja']}],
|
||||
\ ['pangloss/vim-javascript', { 'on_ft' : ['javascript']}],
|
||||
\ ['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}],
|
||||
\ ['leafgarland/typescript-vim', { 'on_ft' : ['typescript']}],
|
||||
\ ['kchmck/vim-coffee-script', { 'on_ft' : ['coffee']}],
|
||||
\ ['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}],
|
||||
\ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}],
|
||||
\ ['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}],
|
||||
\ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}],
|
||||
\ ['ynkdir/vim-vimlparser', { 'on_ft' : 'vim'}],
|
||||
\ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}],
|
||||
@ -28,6 +24,7 @@ function! SpaceVim#layers#lang#plugins() abort
|
||||
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
||||
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
|
||||
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
||||
\ ['voxpupuli/vim-puppet', {'on_ft' : 'puppet'}],
|
||||
\ ['rust-lang/rust.vim', {'merged' : 1}],
|
||||
\ ]
|
||||
" python
|
||||
|
@ -4,15 +4,55 @@ function! SpaceVim#layers#lang#java#plugins() abort
|
||||
\ ['wsdjeg/java_getset.vim', { 'on_ft' : 'java', 'loadconf' : 1}],
|
||||
\ ['wsdjeg/JavaUnit.vim', { 'on_ft' : 'java'}],
|
||||
\ ['vim-jp/vim-java', { 'on_ft' : 'java'}],
|
||||
\ ['artur-shaik/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}],
|
||||
\ ]
|
||||
if g:spacevim_enable_javacomplete2_py
|
||||
call add(plugins , ['wsdjeg/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
||||
else
|
||||
call add(plugins , ['artur-shaik/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#java#config() abort
|
||||
|
||||
function! s:java_mappings() abort
|
||||
inoremap <silent> <buffer> <leader>UU <esc>bgUwea
|
||||
inoremap <silent> <buffer> <leader>uu <esc>bguwea
|
||||
inoremap <silent> <buffer> <leader>ua <esc>bgulea
|
||||
inoremap <silent> <buffer> <leader>Ua <esc>bgUlea
|
||||
nmap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
imap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
nmap <silent><buffer> <leader>jI <Plug>(JavaComplete-Imports-AddMissing)
|
||||
nmap <silent><buffer> <leader>jR <Plug>(JavaComplete-Imports-RemoveUnused)
|
||||
nmap <silent><buffer> <leader>ji <Plug>(JavaComplete-Imports-AddSmart)
|
||||
nmap <silent><buffer> <leader>jii <Plug>(JavaComplete-Imports-Add)
|
||||
|
||||
imap <silent><buffer> <C-j>I <Plug>(JavaComplete-Imports-AddMissing)
|
||||
imap <silent><buffer> <C-j>R <Plug>(JavaComplete-Imports-RemoveUnused)
|
||||
imap <silent><buffer> <C-j>i <Plug>(JavaComplete-Imports-AddSmart)
|
||||
imap <silent><buffer> <C-j>ii <Plug>(JavaComplete-Imports-Add)
|
||||
|
||||
nmap <silent><buffer> <leader>jM <Plug>(JavaComplete-Generate-AbstractMethods)
|
||||
|
||||
imap <silent><buffer> <C-j>jM <Plug>(JavaComplete-Generate-AbstractMethods)
|
||||
|
||||
nmap <silent><buffer> <leader>jA <Plug>(JavaComplete-Generate-Accessors)
|
||||
nmap <silent><buffer> <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
nmap <silent><buffer> <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
nmap <silent><buffer> <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
nmap <silent><buffer> <leader>jts <Plug>(JavaComplete-Generate-ToString)
|
||||
nmap <silent><buffer> <leader>jeq <Plug>(JavaComplete-Generate-EqualsAndHashCode)
|
||||
nmap <silent><buffer> <leader>jc <Plug>(JavaComplete-Generate-Constructor)
|
||||
nmap <silent><buffer> <leader>jcc <Plug>(JavaComplete-Generate-DefaultConstructor)
|
||||
|
||||
imap <silent><buffer> <C-j>s <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
imap <silent><buffer> <C-j>g <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
imap <silent><buffer> <C-j>a <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
|
||||
vmap <silent><buffer> <leader>js <Plug>(JavaComplete-Generate-AccessorSetter)
|
||||
vmap <silent><buffer> <leader>jg <Plug>(JavaComplete-Generate-AccessorGetter)
|
||||
vmap <silent><buffer> <leader>ja <Plug>(JavaComplete-Generate-AccessorSetterGetter)
|
||||
endfunction
|
||||
augroup SpaceVim_lang_java
|
||||
au!
|
||||
autocmd FileType java setlocal omnifunc=javacomplete#Complete
|
||||
autocmd FileType java call s:java_mappings()
|
||||
set tags +=~/others/openjdksrc/java/tags
|
||||
set tags +=~/others/openjdksrc/javax/tags
|
||||
augroup END
|
||||
endfunction
|
||||
|
13
autoload/SpaceVim/layers/lang/javascript.vim
Normal file
13
autoload/SpaceVim/layers/lang/javascript.vim
Normal file
@ -0,0 +1,13 @@
|
||||
function! SpaceVim#layers#lang#javascript#plugins() abort
|
||||
let plugins = []
|
||||
cal add(plugins,['pangloss/vim-javascript', { 'on_ft' : ['javascript']}])
|
||||
if has('nvim')
|
||||
call add(plugins,['carlitux/deoplete-ternjs', { 'on_ft' : ['javascript']}])
|
||||
else
|
||||
call add(plugins,['ternjs/tern_for_vim', { 'on_ft' : ['javascript']}])
|
||||
endif
|
||||
call add(plugins,['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}])
|
||||
call add(plugins,['mmalecki/vim-node.js', { 'on_ft' : ['javascript']}])
|
||||
call add(plugins,['maksimr/vim-jsbeautify', { 'on_ft' : ['javascript']}])
|
||||
return plugins
|
||||
endfunction
|
14
autoload/SpaceVim/layers/lang/lua.vim
Normal file
14
autoload/SpaceVim/layers/lang/lua.vim
Normal file
@ -0,0 +1,14 @@
|
||||
"WolfgangMehner/lua-support
|
||||
"http://lua-users.org/wiki/LuaEditorSupport
|
||||
"
|
||||
function! SpaceVim#layers#lang#lua#plugins() abort
|
||||
let plugins = []
|
||||
" Improved Lua 5.3 syntax and indentation support for Vim
|
||||
call add(plugins, ['tbastos/vim-lua', {'on_ft' : 'lua'}])
|
||||
call add(plugins, ['WolfgangMehner/lua-support', {'on_ft' : 'lua'}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#lua#config() abort
|
||||
|
||||
endfunction
|
9
autoload/SpaceVim/layers/lang/perl.vim
Normal file
9
autoload/SpaceVim/layers/lang/perl.vim
Normal file
@ -0,0 +1,9 @@
|
||||
function! SpaceVim#layers#lang#perl#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins, ['WolfgangMehner/perl-support', {'on_ft' : 'perl'}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#perl#config() abort
|
||||
|
||||
endfunction
|
@ -11,6 +11,7 @@ function! SpaceVim#plugins#load() abort
|
||||
endfunction
|
||||
function! s:load_plugins() abort
|
||||
for group in g:spacevim_plugin_groups
|
||||
let g:spacevim_plugin_layer = group
|
||||
for plugin in s:getLayerPlugins(group)
|
||||
if len(plugin) == 2
|
||||
call zvim#plug#add(plugin[0], plugin[1])
|
||||
@ -26,6 +27,9 @@ function! s:load_plugins() abort
|
||||
endfor
|
||||
call s:loadLayerConfig(group)
|
||||
endfor
|
||||
if exists('g:spacevim_plugin_layer')
|
||||
unlet g:spacevim_plugin_layer
|
||||
endif
|
||||
for plugin in g:spacevim_custom_plugins
|
||||
if len(plugin) == 2
|
||||
call zvim#plug#add(plugin[0], plugin[1])
|
||||
|
@ -165,8 +165,11 @@ function! zvim#plug#add(repo,...) abort
|
||||
exec "Plug '".a:repo."'"
|
||||
endif
|
||||
endif
|
||||
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
|
||||
let str = '[' . str . ']'
|
||||
let str = str . repeat(' ', 25 - len(str))
|
||||
exec 'call add(g:unite_source_menu_menus'
|
||||
\ . '.AddedPlugins.command_candidates, ["['
|
||||
\ . '.AddedPlugins.command_candidates, ["'. str . '['
|
||||
\ . a:repo
|
||||
\ . (len(a:000) > 0 ? (']'
|
||||
\ . repeat(' ', 40 - len(a:repo))
|
||||
|
@ -58,17 +58,6 @@ function! XmlFileTypeInit()
|
||||
set dict+=~/.vim/bundle/vim-dict/dict/android_xml.dic
|
||||
endif
|
||||
endf
|
||||
function! JavaFileTypeInit()
|
||||
set omnifunc=javacomplete#Complete
|
||||
set tags +=~/others/openjdksrc/java/tags
|
||||
set tags +=~/others/openjdksrc/javax/tags
|
||||
inoremap <silent> <buffer> <leader>UU <esc>bgUwea
|
||||
inoremap <silent> <buffer> <leader>uu <esc>bguwea
|
||||
inoremap <silent> <buffer> <leader>ua <esc>bgulea
|
||||
inoremap <silent> <buffer> <leader>Ua <esc>bgUlea
|
||||
nmap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
imap <silent><buffer> <F4> <Plug>(JavaComplete-Imports-Add)
|
||||
endf
|
||||
function! WSDAutoComplete(char)
|
||||
if(getline(".")=~?'^\s*.*\/\/')==0
|
||||
let line = getline('.')
|
||||
|
@ -5,7 +5,6 @@ if has('filterpipe')
|
||||
set noshelltemp
|
||||
endif
|
||||
if count(g:spacevim_plugin_groups, 'colorscheme') && g:spacevim_colorscheme !=# '' "{{{
|
||||
set background=dark
|
||||
try
|
||||
exec 'colorscheme '. g:spacevim_colorscheme
|
||||
catch
|
||||
|
@ -12,6 +12,7 @@ let g:deoplete#omni#input_patterns.java = [
|
||||
\'[^. \t0-9]\::\w*',
|
||||
\]
|
||||
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
|
||||
let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*']
|
||||
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
|
||||
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
|
||||
let g:deoplete#omni_patterns.php = '->\|::'
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
# A guarding function to avoid executing an incompletely downloaded script
|
||||
guard () {
|
||||
|
||||
# Reset
|
||||
Color_off='\033[0m' # Text Reset
|
||||
|
||||
@ -142,3 +145,9 @@ need_cmd 'git'
|
||||
fetch_repo
|
||||
install_vim
|
||||
install_neovim
|
||||
|
||||
# end of guard
|
||||
}
|
||||
|
||||
# download finished fine
|
||||
guard
|
||||
|
Loading…
x
Reference in New Issue
Block a user