Installed eclim + remved autocomplete plugins

This commit is contained in:
2014-08-31 22:16:01 +02:00
parent 9b88b794a1
commit ce98650c57
226 changed files with 32126 additions and 4 deletions

View File

@@ -0,0 +1,464 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
" Plugin that integrates vim with the eclipse plugin eclim (ECLipse
" IMproved).
"
" This plugin contains shared functions that can be used regardless of the
" current file type being edited.
"
" License:
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Global Variables {{{
" at least one ubuntu user had serious performance issues using the python
" client, so we are only going to default to python on windows machines
" where there is an actual potential benefit to using it.
call eclim#AddVimSetting(
\ 'Core', 'g:EclimNailgunClient',
\ has('python') && (has('win32') || has('win64')) ? 'python' : 'external',
\ 'Sets the eclim nailgun client to use when communicating with eclimd.',
\ '\(external\|python\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimLogLevel', 'info',
\ 'Sets the eclim logging level within vim.',
\ '\(trace\|debug\|info\|warning\|error\|off\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimHighlightTrace', 'Normal',
\ 'Sets the vim highlight group to be used for trace messages.')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimHighlightDebug', 'Normal',
\ 'Sets the vim highlight group to be used for debug messages.')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimHighlightInfo', 'Statement',
\ 'Sets the vim highlight group to be used for info messages/signs.')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimHighlightWarning', 'WarningMsg',
\ 'Sets the vim highlight group to be used for warning messages/signs.')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimHighlightError', 'Error',
\ 'Sets the vim highlight group to be used for error messages/signs.')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimMenus', 1,
\ 'When enabled, eclim will generate gvim menu items for eclim commands',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimDefaultFileOpenAction', 'split',
\ "The global default action used to open files from various eclim commands.\n" .
\ "Any command that provides a setting for their open action will use this\n" .
\ "value as their default unless otherwise overridden.")
call eclim#AddVimSetting(
\ 'Core', 'g:EclimCompletionMethod', 'completefunc',
\ "Determines whether eclim's various completion functions are registed\n" .
\ "to vim's completefunc (<c-x><c-u>) or omnifunc (<c-x><c-o>).",
\ '\(completefunc\|omnifunc\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimValidateSortResults', 'occurrence',
\ 'Sets how validation results from the various language validators will be sorted',
\ '\(occurrence\|severity\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimTempFilesEnable', 0,
\ 'Should eclim ever use temp files for code completion, etc.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimFileTypeValidate', 1,
\ "Allows you to disable all eclim lang validators at once.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimRefactorDiffOrientation', 'vertical',
\ "When viewing a diff for a refactoring, should the diff split be\n" .
\ "vertical or horizontal.",
\ '\(horizontal\|vertical\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimShowCurrentError', 1,
\ "When enabled, eclim with echo the quickfix/location list message,\n" .
\ "if any, for the line under the cursor.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimShowCurrentErrorBalloon', 1,
\ "When enabled, eclim will display a balloon popup (gvim only) containing\n" .
\ "the quickfix/location list message, if any, for the line under the cursor.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimLargeFileEnabled', 0,
\ "When enabled, eclim will disable some vim features to speed up\n" .
\ "opening, navigating, etc, large files.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimLargeFileSize', 5,
\ "The minimum size of the file in mb before the file is considered\n" .
\ "large enough to apply large file settings (if enabled).",
\ '\d\+')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimPromptListStartIndex', 0,
\ 'The starting index to use for list based prompts.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimMakeLCD', 1,
\ "When set to a non-0 value, all eclim based make commands\n" .
\ "(:Ant, :Maven, :Mvn, etc) will change to the current file's\n" .
\ "project root before executing.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core', 'g:EclimMakeDispatchEnabled', 1,
\ "When tpope/vim-dispatch is installed and this option is set\n" .
\ "to a non-0 value, then eclim will run its make based commands\n" .
\ "(:Ant, :Maven, :Mvn, etc) via dispatch.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimSignLevel', has('signs') ? 'info' : 'off',
\ 'Sets the level of signs (markers) that will be placed by eclim.',
\ '\(info\|warning\|error\|off\)')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimShowQuickfixSigns', 1,
\ 'Determines if a sign is placed on lines found in the quickfix list.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimShowLoclistSigns', 1,
\ 'Determines if a sign is placed on lines found in the location list.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimQuickfixSignText', '>',
\ 'Sets the one or two character text used for quickfix list signs.',
\ '.\{1,2}')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimLoclistSignText', '>>',
\ 'Sets the one or two character text used for location list signs.',
\ '.\{1,2}')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimUserSignText', '#',
\ 'Sets the one or two character text used for user placed signs.',
\ '.\{1,2}')
call eclim#AddVimSetting(
\ 'Core/Signs', 'g:EclimHighlightUserSign', g:EclimHighlightInfo,
\ 'Sets the vim highlight group to be used for user placed signs.')
call eclim#AddVimSetting(
\ 'Core/:Buffers', 'g:EclimBuffersTabTracking', 1,
\ "When enabled, eclim will keep track of which tabs buffers have\n" .
\ "been opened on, allowing the :Buffers command to limit results\n" .
\ "based on the current tab.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/:Buffers', 'g:EclimBuffersSort', 'file',
\ 'Determines how the results are sorted in the :Buffers window.',
\ '\(file\|path\|bufnr\)')
call eclim#AddVimSetting(
\ 'Core/:Buffers', 'g:EclimBuffersSortDirection', 'asc',
\ 'Determines the direction of the sort in the :Buffers window.',
\ '\(asc\|desc\)')
call eclim#AddVimSetting(
\ 'Core/:Buffers', 'g:EclimBuffersDefaultAction', g:EclimDefaultFileOpenAction,
\ 'Sets the default command used to open selected entries in the :Buffers window.')
call eclim#AddVimSetting(
\ 'Core/:Buffers', 'g:EclimBuffersDeleteOnTabClose', 0,
\ "When buffer tab tracking is enabled, this determines if all the\n" .
\ "buffers associated with a tab are deleted whenthat tab is closed.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/:Only', 'g:EclimOnlyExclude', '^NONE$',
\ "Vim regex pattern to match against buffer names that when matched,\n" .
\ "will not be closed upon calling eclim's :Only command.")
call eclim#AddVimSetting(
\ 'Core/:Only', 'g:EclimOnlyExcludeFixed', 1,
\ "When running eclim's :Only command, should 'fixed' windows (quickfix,\n" .
\ "project tree, tag list, etc) be preserved (excluded from being closed).",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/:History', 'g:EclimKeepLocalHistory', exists('g:vimplugin_running'),
\ 'Whether or not to update the eclipse local history for project files.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/:History', 'g:EclimHistoryDiffOrientation', 'vertical',
\ "When viewing a diff from the history buffer, should the diff split be\n" .
\ "vertical or horizontal.",
\ '\(horizontal\|vertical\)')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileDefaultAction', g:EclimDefaultFileOpenAction,
\ 'The default action to use when opening files from :LocateFile')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileScope', 'project',
\ 'The default search scope when searching from the context of a project.')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileNonProjectScope', 'workspace',
\ 'The default search scope when searching from outside the context of a project.')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileFuzzy', 1,
\ 'Whether or not to use fuzzy matching when searching.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileCaseInsensitive', 'lower',
\ 'Sets under what condition will the search be case insensitive.',
\ '\(lower\|never\|always\)')
call eclim#AddVimSetting(
\ 'Core/:LocateFile', 'g:EclimLocateFileCaseInsensitive', 'lower',
\ 'Sets under what condition will the search be case insensitive.',
\ '\(lower\|never\|always\)')
call eclim#AddVimSetting(
\ 'Lang/Xml', 'g:EclimXmlValidate', 1,
\ 'Whether or not to validate xml files on save.',
\ '\(0\|1\)')
if !exists('g:EclimLocateUserScopes')
let g:EclimLocateUserScopes = []
endif
if !exists("g:EclimLocationListHeight")
let g:EclimLocationListHeight = 10
endif
if !exists("g:EclimMakeQfFilter")
let g:EclimMakeQfFilter = 1
endif
if !exists("g:EclimTemplatesDisabled")
" Disabled for now.
let g:EclimTemplatesDisabled = 1
endif
if !exists("g:EclimSeparator")
let g:EclimSeparator = '/'
if has("win32") || has("win64")
let g:EclimSeparator = '\'
endif
endif
let g:EclimQuote = "['\"]"
if !exists("g:EclimTempDir")
let g:EclimTempDir = expand('$TMP')
if g:EclimTempDir == '$TMP'
let g:EclimTempDir = expand('$TEMP')
endif
if g:EclimTempDir == '$TEMP' && has('unix')
let g:EclimTempDir = '/tmp'
endif
let g:EclimTempDir = substitute(g:EclimTempDir, '\', '/', 'g')
endif
" }}}
" Command Declarations {{{
if !exists(":PingEclim")
command -nargs=? -complete=customlist,eclim#client#nailgun#CommandCompleteWorkspaces
\ PingEclim :call eclim#PingEclim(1, '<args>')
endif
if !exists(":ShutdownEclim")
command ShutdownEclim :call eclim#ShutdownEclim()
endif
if !exists(":VimSettings")
command VimSettings :call eclim#VimSettings()
endif
if !exists(":WorkspaceSettings")
command -nargs=? -complete=customlist,eclim#client#nailgun#CommandCompleteWorkspaces
\ WorkspaceSettings :call eclim#Settings('<args>')
endif
if !exists(":EclimDisable")
command EclimDisable :call eclim#Disable()
endif
if !exists(":EclimEnable")
command EclimEnable :call eclim#Enable()
endif
if !exists(':EclimHelp')
command -nargs=? -complete=customlist,eclim#help#CommandCompleteTag
\ EclimHelp :call eclim#help#Help('<args>', 0)
endif
if !exists(':EclimHelpGrep')
command -nargs=+ EclimHelpGrep :call eclim#help#HelpGrep(<q-args>)
endif
if !exists(":RefactorUndo")
command RefactorUndo :call eclim#lang#UndoRedo('undo', 0)
command RefactorRedo :call eclim#lang#UndoRedo('redo', 0)
command RefactorUndoPeek :call eclim#lang#UndoRedo('undo', 1)
command RefactorRedoPeek :call eclim#lang#UndoRedo('redo', 1)
endif
if !exists(":Buffers")
command -bang Buffers :call eclim#common#buffers#Buffers('<bang>')
command -bang BuffersToggle :call eclim#common#buffers#BuffersToggle('<bang>')
endif
if !exists(":Only")
command Only :call eclim#common#buffers#Only()
endif
if !exists(":DiffLastSaved")
command DiffLastSaved :call eclim#common#util#DiffLastSaved()
endif
if !exists(":SwapWords")
command SwapWords :call eclim#common#util#SwapWords()
endif
if !exists(":SwapAround")
command -nargs=1 SwapAround :call eclim#common#util#SwapAround('<args>')
endif
if !exists(":LocateFile")
command -nargs=? LocateFile :call eclim#common#locate#LocateFile('', '<args>')
command -nargs=? LocateBuffer
\ :call eclim#common#locate#LocateFile('', '<args>', 'buffers')
endif
if !exists(":QuickFixClear")
command QuickFixClear :call setqflist([]) | call eclim#display#signs#Update()
endif
if !exists(":LocationListClear")
command LocationListClear :call setloclist(0, []) | call eclim#display#signs#Update()
endif
if !exists(":Tcd")
command -nargs=1 -complete=dir Tcd :call eclim#common#util#Tcd('<args>')
endif
if !exists(":History")
command History call eclim#common#history#History()
command -bang HistoryClear call eclim#common#history#HistoryClear('<bang>')
endif
if has('signs')
if !exists(":Sign")
command Sign :call eclim#display#signs#Toggle('user', line('.'))
endif
if !exists(":Signs")
command Signs :call eclim#display#signs#ViewSigns('user')
endif
if !exists(":SignClearUser")
command SignClearUser :call eclim#display#signs#UnplaceAll(
\ eclim#display#signs#GetExisting('user'))
endif
if !exists(":SignClearAll")
command SignClearAll :call eclim#display#signs#UnplaceAll(
\ eclim#display#signs#GetExisting())
endif
endif
if !exists(":OpenUrl")
command -bang -range -nargs=? OpenUrl
\ :call eclim#web#OpenUrl('<args>', '<bang>', <line1>, <line2>)
endif
if !exists(":Make")
command -bang -nargs=* Make :call eclim#util#Make('<bang>', '<args>')
endif
" }}}
" Auto Commands{{{
augroup eclim_archive_read
autocmd!
if exists('#archive_read')
autocmd! archive_read
endif
autocmd BufReadCmd
\ jar:/*,jar:\*,jar:file:/*,jar:file:\*,
\tar:/*,tar:\*,tar:file:/*,tar:file:\*,
\tbz2:/*,tgz:\*,tbz2:file:/*,tbz2:file:\*,
\tgz:/*,tgz:\*,tgz:file:/*,tgz:file:\*,
\zip:/*,zip:\*,zip:file:/*,zip:file:\*
\ call eclim#common#util#ReadFile()
augroup END
if g:EclimShowCurrentError
" forcing load of util, otherwise a bug in vim is sometimes triggered when
" searching for a pattern where the pattern is echoed twice. Reproducable
" by opening a new vim and searching for 't' (/t<cr>).
runtime eclim/autoload/eclim/util.vim
augroup eclim_show_error
autocmd!
autocmd CursorMoved * call eclim#util#ShowCurrentError()
augroup END
endif
if g:EclimShowCurrentErrorBalloon && has('balloon_eval')
set ballooneval
set balloonexpr=eclim#util#Balloon(eclim#util#GetLineError(line('.')))
endif
if g:EclimMakeQfFilter
augroup eclim_qf_filter
autocmd!
autocmd QuickFixCmdPost make
\ if exists('b:EclimQuickfixFilter') |
\ call eclim#util#SetQuickfixList(getqflist(), 'r') |
\ endif
augroup END
endif
if g:EclimSignLevel != 'off'
augroup eclim_qf
autocmd WinEnter,BufWinEnter * call eclim#display#signs#Update()
if has('gui_running')
" delayed to keep the :make output on the screen for gvim
autocmd QuickFixCmdPost * call eclim#util#DelayedCommand(
\ 'call eclim#display#signs#QuickFixCmdPost()')
else
autocmd QuickFixCmdPost * call eclim#display#signs#QuickFixCmdPost()
endif
augroup END
endif
if g:EclimBuffersTabTracking && exists('*gettabvar')
call eclim#common#buffers#TabInit()
augroup eclim_buffer_tab_tracking
autocmd!
autocmd BufWinEnter,BufWinLeave * call eclim#common#buffers#TabLastOpenIn()
autocmd TabEnter * call eclim#common#buffers#TabEnter()
autocmd TabLeave * call eclim#common#buffers#TabLeave()
augroup END
endif
if has('gui_running') && g:EclimMenus
augroup eclim_menus
autocmd BufNewFile,BufReadPost,WinEnter * call eclim#display#menu#Generate()
autocmd VimEnter * if expand('<amatch>')=='' | call eclim#display#menu#Generate() | endif
augroup END
endif
if !g:EclimTemplatesDisabled
augroup eclim_template
autocmd!
autocmd BufNewFile * call eclim#common#template#Template()
augroup END
endif
if !exists('#LargeFile') && g:EclimLargeFileEnabled
augroup eclim_largefile
autocmd!
autocmd BufReadPre * call eclim#common#largefile#InitSettings()
augroup END
endif
" }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,101 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
" Vim file type detection script for eclim.
"
" License:
"
" Copyright (C) 2005 - 2011 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" EclimSetXmlFileType(map) {{{
" Sets the filetype of the current xml file to the if its root element is in the
" supplied map.
function! EclimSetXmlFileType(map)
if !exists("b:eclim_xml_filetype")
" cache the root element so that subsiquent calls don't need to re-examine
" the file.
if !exists("b:xmlroot")
let b:xmlroot = s:GetRootElement()
endif
if has_key(a:map, b:xmlroot)
let b:eclim_xml_filetype = a:map[b:xmlroot]
let &filetype = b:eclim_xml_filetype
endif
" occurs when re-opening an existing buffer.
elseif &ft != b:eclim_xml_filetype
if has_key(a:map, b:xmlroot)
let &filetype = a:map[b:xmlroot]
endif
endif
endfunction " }}}
" GetRootElement() {{{
" Get the root element name.
function! s:GetRootElement()
" handle case where file doesn't have xml an extension or an xml declaration
if expand('%:e') != 'xml' && getline(1) !~ '<?\s*xml.*?>'
set filetype=xml
endif
let root = ''
let element = '.\{-}<\([a-zA-Z].\{-}\)\(\s\|>\|$\).*'
" search for usage of root element (first occurence of <[a-zA-Z]).
let numlines = line("$")
let line = 1
let pos = getpos('.')
try
while line <= numlines
call cursor(line, 1)
let found = searchpos('<[a-zA-Z]', 'cn', line)
if found[0]
let syntaxName = synIDattr(synID(found[0], found[1], 1), "name")
if syntaxName == 'xmlTag'
let root = substitute(getline(line), element, '\1', '')
break
endif
endif
let line = line + 1
endwhile
finally
call setpos('.', pos)
endtry
" no usage, so look for doctype definition of root element
if root == ''
let linenum = search('<!DOCTYPE\s\+\_.\{-}>', 'bcnw')
if linenum > 0
let line = ''
while getline(linenum) !~ '>'
let line = line . getline(linenum)
let linenum += 1
endwhile
let line = line . getline(linenum)
let root = substitute(line, '.*DOCTYPE\s\+\(.\{-}\)\s\+.*', '\1', '')
return root != line ? root : ''
endif
endif
return root
endfunction " }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,55 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
" Vim file type detection script for eclim.
"
" License:
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
let xmltypes = {
\ 'project': 'ant',
\ 'hibernate-mapping': 'hibernate',
\ 'beans': 'spring',
\ 'document': 'forrestdocument',
\ 'form-validation': 'commonsvalidator',
\ 'status': 'forreststatus',
\ 'testsuite': 'junitresult',
\ 'log4j:configuration': 'log4j'
\ }
autocmd BufRead .classpath
\ call EclimSetXmlFileType({'classpath': 'eclipse_classpath'})
autocmd BufRead ivy.xml
\ call EclimSetXmlFileType({'ivy-module': 'ivy'})
autocmd BufRead pom.xml
\ call EclimSetXmlFileType({'project': 'mvn_pom'})
autocmd BufRead struts-config.xml
\ call EclimSetXmlFileType({'struts-config': 'strutsconfig'})
autocmd BufRead *.tld
\ call EclimSetXmlFileType({'taglib': 'tld'})
autocmd BufRead *web.xml
\ call EclimSetXmlFileType({'web-app': 'webxml'})
autocmd BufRead *.wsdl
\ call EclimSetXmlFileType({'definitions': 'wsdl', 'wsdl:definitions': 'wsdl'})
autocmd BufRead *.xml call EclimSetXmlFileType(xmltypes)
autocmd BufRead *.gant set ft=gant
autocmd BufRead *.gst set ft=groovy_simple_template
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,60 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
" see http://eclim.org/vim/java/tools.html
"
" License:
"
" Copyright (C) 2005 - 2013 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Autocmds {{{
augroup eclim_java_class_read
autocmd!
autocmd BufReadCmd *.class call eclim#java#util#ReadClassPrototype()
augroup END
" }}}
" Command Declarations {{{
if !exists(":Jps") && executable('jps')
command Jps :call eclim#java#tools#Jps()
endif
if !exists(":Ant")
command -bang -nargs=* -complete=customlist,eclim#java#ant#complete#CommandCompleteTarget
\ Ant :call eclim#java#tools#MakeWithJavaBuildTool('eclim_ant', '<bang>', '<args>')
endif
if !exists(":Maven")
command -bang -nargs=* Maven
\ :call eclim#java#tools#MakeWithJavaBuildTool('eclim_maven', '<bang>', '<args>')
endif
if !exists(":MavenRepo")
command -nargs=0 -buffer
\ MavenRepo :call eclim#java#maven#SetClasspathVariable('Maven', 'MAVEN_REPO', '')
endif
if !exists(":Mvn")
command -bang -nargs=* Mvn
\ :call eclim#java#tools#MakeWithJavaBuildTool('eclim_mvn', '<bang>', '<args>')
endif
if !exists(":MvnRepo")
command -nargs=* -buffer
\ MvnRepo :call eclim#java#maven#SetClasspathVariable('Mvn', 'M2_REPO', '<args>')
endif
" }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,223 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
"
" License:
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Global Variables {{{
let g:EclimProjectTreeTitle = 'ProjectTree_'
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectTreeAutoOpen', 0,
\ "Determines if the project tree should be auto opened when starting\n" .
\ "vim or a new tab in a project context.",
\ '\(0\|1\)')
if exists('g:vimplugin_running')
let g:EclimProjectTreeAutoOpen = 0
endif
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectTabTreeAutoOpen', 1,
\ "Sets whether to auto open the project tree when using :ProjectTab\n" .
\ "to open a new tab.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectTreeExpandPathOnOpen', 0,
\ "Whether or not to open the path to the current file when the project\n" .
\ "tree is first opend.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectTreeSharedInstance', 1,
\ 'Sets whether to used a shared instance of the project tree per project.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectTreePathEcho', 1,
\ "Should the path of the file under the cursor be echoed as you navigate\n" .
\ "the project tree.",
\ '\(0\|1\)')
if g:EclimProjectTreeAutoOpen && !exists('g:EclimProjectTreeAutoOpenProjects')
let g:EclimProjectTreeAutoOpenProjects = ['CURRENT']
endif
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectRefreshFiles', 1,
\ 'Sets whether or not to notify eclipse of every file save in a project.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectProblemsUpdateOnSave', 1,
\ 'Should the open :ProjectProblems window be updated when saving source files.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectProblemsUpdateOnBuild', 1,
\ 'Should the open :ProjectProblems window be updated when running :ProjectBuild.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Core/Projects', 'g:EclimProjectProblemsQuickFixOpen', 'botright copen',
\ 'Sets the vim command used to open the :ProjectProblems quickfix window.')
" }}}
" Auto Commands {{{
" w/ external vim refresh is optional, w/ embedded gvim it is mandatory
" disabling at all though is discouraged.
if g:EclimProjectRefreshFiles || exists('g:vimplugin_running')
augroup eclim_refresh_files
autocmd!
autocmd BufWritePre * call eclim#project#util#RefreshFileBootstrap()
augroup END
endif
if g:EclimKeepLocalHistory
augroup eclim_history_add
autocmd!
autocmd BufWritePre * call eclim#common#history#AddHistory()
augroup END
endif
if g:EclimProjectTreeAutoOpen
augroup project_tree_autoopen
autocmd!
autocmd VimEnter *
\ if eclim#project#util#GetCurrentProjectRoot() != '' |
\ call eclim#project#tree#ProjectTree(copy(g:EclimProjectTreeAutoOpenProjects)) |
\ exec g:EclimProjectTreeContentWincmd |
\ endif
augroup END
autocmd BufWinEnter *
\ if tabpagenr() > 1 &&
\ !exists('t:project_tree_auto_opened') &&
\ !exists('g:SessionLoad') &&
\ eclim#project#util#GetCurrentProjectRoot() != '' |
\ let t:project_tree_auto_opened = 1 |
\ call eclim#project#tree#ProjectTree(copy(g:EclimProjectTreeAutoOpenProjects)) |
\ exec g:EclimProjectTreeContentWincmd |
\ endif
endif
autocmd SessionLoadPost * call eclim#project#tree#Restore()
" }}}
" Command Declarations {{{
if !exists(":ProjectCreate")
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectCreate
\ ProjectCreate :call eclim#project#util#ProjectCreate('<args>')
command -nargs=1 -complete=dir
\ ProjectImport :call eclim#project#util#ProjectImport('<args>')
command -nargs=1
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectDelete :call eclim#project#util#ProjectDelete('<args>')
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectRename :call eclim#project#util#ProjectRename('<args>')
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectMove
\ ProjectMove :call eclim#project#util#ProjectMove('<args>')
command -nargs=*
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectRefresh :call eclim#project#util#ProjectRefresh('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectBuild :call eclim#project#util#ProjectBuild('<args>')
command ProjectRefreshAll :call eclim#project#util#ProjectRefreshAll()
command ProjectCacheClear :call eclim#project#util#ClearProjectsCache()
command -nargs=? -complete=customlist,eclim#client#nailgun#CommandCompleteWorkspaces
\ ProjectList :call eclim#project#util#ProjectList('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectSettings :call eclim#project#util#ProjectSettings('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectInfo :call eclim#project#util#ProjectInfo('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectOpen :call eclim#project#util#ProjectOpen('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectClose :call eclim#project#util#ProjectClose('<args>')
command -nargs=?
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectNatures :call eclim#project#util#ProjectNatures('<args>')
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectNatureAdd
\ ProjectNatureAdd
\ :call eclim#project#util#ProjectNatureModify('add', '<args>')
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectNatureRemove
\ ProjectNatureRemove
\ :call eclim#project#util#ProjectNatureModify('remove', '<args>')
endif
if !exists(":ProjectProblems")
command -nargs=? -bang
\ -complete=customlist,eclim#project#util#CommandCompleteProject
\ ProjectProblems :call eclim#project#problems#Problems('<args>', 1, '<bang>')
endif
if !exists(":ProjectTree")
command -nargs=*
\ -complete=customlist,eclim#project#util#CommandCompleteProjectOrDirectory
\ ProjectTree :call eclim#project#tree#ProjectTree(<f-args>)
command -nargs=0 ProjectTreeToggle :call eclim#project#tree#ProjectTreeToggle()
command -nargs=0 ProjectsTree
\ :call eclim#project#tree#ProjectTree(eclim#project#util#GetProjectNames())
command -nargs=1
\ -complete=customlist,eclim#project#util#CommandCompleteProjectOrDirectory
\ ProjectTab :call eclim#project#util#ProjectTab('<args>')
endif
if !exists(":ProjectCD")
command ProjectCD :call eclim#project#util#ProjectCD(0)
command ProjectLCD :call eclim#project#util#ProjectCD(1)
endif
if !exists(":ProjectGrep")
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectRelative
\ ProjectGrep :call eclim#project#util#ProjectGrep('vimgrep', <q-args>)
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectRelative
\ ProjectGrepAdd :call eclim#project#util#ProjectGrep('vimgrepadd', <q-args>)
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectRelative
\ ProjectLGrep :call eclim#project#util#ProjectGrep('lvimgrep', <q-args>)
command -nargs=+
\ -complete=customlist,eclim#project#util#CommandCompleteProjectRelative
\ ProjectLGrepAdd :call eclim#project#util#ProjectGrep('lvimgrepadd', <q-args>)
endif
if !exists(":Todo")
command -nargs=0 Todo :call eclim#project#util#Todo()
endif
if !exists(":ProjectTodo")
command -nargs=0 ProjectTodo :call eclim#project#util#ProjectTodo()
endif
" }}}
" Menu Items {{{
"if has('gui')
" amenu <silent> &Plugin.&eclim.Projects.List :ProjectList<cr>
"endif
" }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,104 @@
" Author: Eric Van Dewoestine
"
" License: {{{
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Global Varables {{{
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaCompleteLayout',
\ &completeopt !~ 'preview' && &completeopt =~ 'menu' ? 'standard' : 'compact',
\ "Determines how overloaded methods are displayed in the completion popup.\n" .
\ "The default is based on your current completion settings. If set to 'compact',\n" .
\ "you can set it to 'standard' to force eclim to display all overridden members\n" .
\ "in the popup rather than relying on the preview menu for that info.",
\ '\(standard\|compact\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaCompleteCaseSensitive', !&ignorecase,
\ 'Sets whether or not java code completion is case sensitive.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaValidate', 1,
\ 'Sets whether or not to validate java files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaSyntasticEnabled', 0,
\ "Only enable this if you want both eclim and syntastic to validate your java files.\n" .
\ "If you want to use syntastic instead of eclim, simply disable JavaValidate.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaSearchSingleResult', g:EclimDefaultFileOpenAction,
\ 'Sets the command to use when opening a single result from a java search.')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaDocSearchSingleResult', 'open',
\ 'Sets the command to use when opening a single result from a java doc search.',
\ '\(open\|lopen\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaHierarchyDefaultAction', g:EclimDefaultFileOpenAction,
\ 'Sets the command to use when opening an entry from the java hierarchy buffer.')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaCallHierarchyDefaultAction', g:EclimDefaultFileOpenAction,
\ 'Sets the command to use when opening an entry from the java call hierarchy buffer.')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaCompilerAutoDetect', 1,
\ "When enabled, eclim will attempt to determine the appropriate\n" .
\ "compiler (ant, maven, javac) to set when you are editing java files,\n" .
\ "allowing you to use :make to execute that build tool.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java', 'g:EclimJavaSetCommonOptions', 1,
\ "Determines if eclim should set a few common vim options (include,\n" .
\ "includeexpr, etc) for you when editing java files.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java/Ant', 'g:EclimAntValidate', 1,
\ 'Sets whether or not to validate your ant xml files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java/Ivy', 'g:EclimIvyClasspathUpdate', 1,
\ "Sets whether or not to update your .classpath file when saving your\n" .
\ "ivy dependencies file.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java/Maven', 'g:EclimMavenPomClasspathUpdate', 1,
\ "Sets whether or not to update your .classpath file when saving your\n" .
\ "maven pom.xml.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java/Log4j', 'g:EclimLog4jValidate', 1,
\ 'Sets whether or not to validate your log4j.xml files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Java/Web.xml', 'g:EclimWebXmlValidate', 1,
\ 'Sets whether or not to validate your web.xml files on save.',
\ '\(0\|1\)')
" }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,61 @@
" Author: Eric Van Dewoestine
"
" License: {{{
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Global Varables {{{
call eclim#AddVimSetting(
\ 'Lang/Css', 'g:EclimCssValidate', 1,
\ 'Sets whether or not to validate css files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Dtd', 'g:EclimDtdValidate', 1,
\ 'Sets whether or not to validate dtd files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Html', 'g:EclimHtmlValidate', 1,
\ 'Sets whether or not to validate html files on save.',
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Html', 'g:EclimHtmlSyntasticEnabled', 0,
\ "Only enable this if you want both eclim and syntastic to validate your html files.\n" .
\ "If you want to use syntastic instead of eclim, simply disable HtmlValidate.",
\ '\(0\|1\)')
call eclim#AddVimSetting(
\ 'Lang/Javascript', 'g:EclimJavascriptValidate', 1,
\ 'Sets whether or not to validate javascript files on save.',
\ '\(0\|1\)')
if !exists("g:EclimJavascriptLintEnabled")
" enabling by default until jsdt validation is mature enough to use.
"let g:EclimJavascriptLintEnabled = 0
let g:EclimJavascriptLintEnabled = 1
endif
call eclim#AddVimSetting(
\ 'Lang/Javascript', 'g:EclimJavascriptLintConf', eclim#UserHome() . '/.jslrc',
\ 'The path to your JavaScript Lint configuration file.')
call eclim#AddVimSetting(
\ 'Lang/Xsd', 'g:EclimXsdValidate', 1,
\ 'Sets whether or not to validate xsd files on save.',
\ '\(0\|1\)')
" }}}
" vim:ft=vim:fdm=marker

View File

@@ -0,0 +1,38 @@
" Author: Eric Van Dewoestine
"
" Description: {{{
" Setup for eclim's vimplugin (gvim in eclipse) support.
"
" License:
"
" Copyright (C) 2011 - 2012 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" }}}
" Auto Commands{{{
if exists('g:vimplugin_running')
augroup eclim_vimplugin
" autocommands used to work around the fact that the "unmodified" event in
" vim's netbean support is commentted out for some reason.
autocmd BufWritePost * call eclim#vimplugin#BufferWritten()
autocmd CursorHold,CursorHoldI * call eclim#vimplugin#BufferModified()
autocmd BufWinLeave * call eclim#vimplugin#BufferClosed()
autocmd BufEnter * call eclim#vimplugin#BufferEnter()
augroup END
endif
" }}}
" vim:ft=vim:fdm=marker