Permalink
Browse files

Version 0.2.12

Added Imports (add/suggest) Refactoring command.
Fixed Search command interaction with Time-base scheduler.
Fixed Search display of entered text prior to calling Ensime.
Fixed Search command result sorting.
Search now non-incremental by default.
Add Search Option allowing the setting for number of results:
    'tailor-symbol-search-maximum-return'
Fixed Ensime config so that indexing is allowed on startup by default.
Upgraded doc and example configs for Ensime Scala 2.10-RC3 build.
  • Loading branch information...
1 parent 796cacc commit c63625d81ad513cb1d1d6d4f9ad099606e7a2961 richard emberson committed with Dec 9, 2012
View
15 README.md
@@ -104,7 +104,8 @@ Current Supported Ensime Commands:
Extract local.
Extract method.
Inline local.
- Not supported yet: Add import for type at point.
+ Add import for type at point.
+ Import suggestions
Useful.
Implementations: 1
@@ -335,7 +336,7 @@ and its on-line manual is at: aemoncannon.github.com/ensime/index.html/.
In addition, for ENSIME, there are pre-built releases available at:
https://github.com/aemoncannon/ensime/downloads.
-I highly recommend getting these (Scala 2.9.2 and/or 2.10.0-SNAPSHOT)
+I highly recommend getting these (Scala 2.9.2 and/or 2.10.0-RC)
rather than trying to build the Ensime Scala code yourself.
Ensime is not a Vim plugin. It is a Scala program. It has to be installed
@@ -361,9 +362,9 @@ ensime_2.9.2-0.9.8.1 as an example:
lib/
README.md
-or ensime_2.10.0-SNAPSHOT-0.9.7:
+or ensime_2.10.0-RC3-0.9.8.2:
- ensime_2.10.0-SNAPSHOT-0.9.7/
+ ensime_2.10.0-RC3-0.9.8.2/
bin/
elisp/
lib/
@@ -376,7 +377,7 @@ ensime_2.9.2-0.9.8.1 (the default value):
call owner.Set("vimside-scala-version", "2.9.2")
-and for ensime_2.10.0-SNAPSHOT-0.9.7:
+and for ensime_2.10.0-RC3-0.9.8.2:
call owner.Set("vimside-scala-version", "2.10.0")
@@ -434,7 +435,7 @@ For example:
or
- call owner.Set("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ call owner.Set("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
Alternatively, you can specify the full path to the ensime distribution
using the Option 'ensime-dist-path'. As an example, if you installed
@@ -510,7 +511,7 @@ So, in the 'options_user.vim' one might have:
in a project file there might be:
call owner.Update("vimside-scala-version", "2.10.0")
- call owner.Update("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ call owner.Update("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
call owner.Update("ensime-config-file-name", "_ensime")
An alternative approach is to also treat the 'data/vimside/' test code
View
25 autoload/vimside/command.vim
@@ -238,9 +238,30 @@ function! vimside#command#RefactorInlineLocal(mode) range
endif
endfunction
-function! vimside#command#RefactorAddImportTypeAtPoint() range
+function! vimside#command#RefactorAddImport() range
if exists("g:vimside.started") && g:vimside.started
- call vimside#command#refactor#AddImportTypeAtPoint()
+ call s:ClearVisualSelection()
+ call vimside#command#refactor#AddImport()
+ else
+ call s:ERROR("Ensime must be started first")
+ endif
+endfunction
+
+function! vimside#command#ImportSuggestions(mode) range
+ if exists("g:vimside.started") && g:vimside.started
+ if a:mode == 'n'
+ call s:ClearVisualSelection()
+ elseif a:mode == 'v'
+ let s:firstline = a:firstline
+ let s:firstcol = col("'<")
+ let s:lastline = a:lastline
+ let s:lastcol = col("'>")
+ let s:visualmode = visualmode()
+ else
+ throw "s:DoMode unknown mode argument: ". a:mode
+ endif
+
+ call vimside#command#refactor#ImportSuggestions()
else
call s:ERROR("Ensime must be started first")
endif
View
370 autoload/vimside/command/refactor.vim
@@ -91,17 +91,17 @@ function! s:ProcessChange(change)
let to = change[':to']
let text = change[':text']
let text = substitute(text, '\\"', '"', "g")
-call s:LOG("s:ProcessChange file=". file)
-call s:LOG("s:ProcessChange from=". from)
-call s:LOG("s:ProcessChange to=". to)
-call s:LOG("s:ProcessChange text=". text)
+"call s:LOG("s:ProcessChange file=". file)
+"call s:LOG("s:ProcessChange from=". from)
+"call s:LOG("s:ProcessChange to=". to)
+"call s:LOG("s:ProcessChange text=". text)
let [found, cfile] = vimside#util#GetCurrentFilename()
if ! found
call s:LOG("s:ProcessChange: no current file")
return
endif
-call s:LOG("s:ProcessChange cfile=". cfile)
+"call s:LOG("s:ProcessChange cfile=". cfile)
if file == cfile
let [fline, fcolumn] = vimside#util#GetLineColumnFromOffset(from)
@@ -110,15 +110,15 @@ call s:LOG("s:ProcessChange cfile=". cfile)
let [fline, fcolumn] = vimside#util#GetLineColumnFromOffset(from, file)
let [tline, tcolumn] = vimside#util#GetLineColumnFromOffset(to, file)
endif
-call s:LOG("s:ProcessChange fline=". fline)
-call s:LOG("s:ProcessChange fcolumn=". fcolumn)
-call s:LOG("s:ProcessChange tline=". tline)
-call s:LOG("s:ProcessChange tcolumn=". tcolumn)
+"call s:LOG("s:ProcessChange fline=". fline)
+"call s:LOG("s:ProcessChange fcolumn=". fcolumn)
+"call s:LOG("s:ProcessChange tline=". tline)
+"call s:LOG("s:ProcessChange tcolumn=". tcolumn)
let offset_diff = to - from
-call s:LOG("s:ProcessChange offset_diff=". offset_diff)
+"call s:LOG("s:ProcessChange offset_diff=". offset_diff)
let line_diff = tline - fline
-call s:LOG("s:ProcessChange line_diff=". line_diff)
+"call s:LOG("s:ProcessChange line_diff=". line_diff)
let ai_save = &ai
let &ai = 0
@@ -134,13 +134,13 @@ call s:LOG("s:ProcessChange line_diff=". line_diff)
try
" Is the start offset at the end of a line. If so, goto next line
let [fnline, fncolumn] = vimside#util#GetLineColumnFromOffset(from+1)
-call s:LOG("s:ProcessChange fnline=". fnline)
-call s:LOG("s:ProcessChange fncolumn=". fncolumn)
+"call s:LOG("s:ProcessChange fnline=". fnline)
+"call s:LOG("s:ProcessChange fncolumn=". fncolumn)
if fnline == fline+1
let fline = fnline
let fcolumn = fncolumn
-call s:LOG("s:ProcessChange new fline=". fline)
-call s:LOG("s:ProcessChange new fcolumn=". fcolumn)
+"call s:LOG("s:ProcessChange new fline=". fline)
+"call s:LOG("s:ProcessChange new fcolumn=". fcolumn)
endif
if line_diff == 0
@@ -168,8 +168,8 @@ call s:LOG("s:ProcessChange new fcolumn=". fcolumn)
if found
let l:filetype = &filetype
let current_bnumber = bufnr("%")
-call s:LOG("s:ProcessChange current_bnumber=". current_bnumber)
-call s:LOG("s:ProcessChange bnumber=". bnumber)
+"call s:LOG("s:ProcessChange current_bnumber=". current_bnumber)
+"call s:LOG("s:ProcessChange bnumber=". bnumber)
" :execute "2b"
execute ''. bnumber ."b"
@@ -206,8 +206,8 @@ call s:LOG("s:ProcessChange bnumber=". bnumber)
if found
let l:filetype = &filetype
let current_bnumber = bufnr("%")
-call s:LOG("s:ProcessChange current_bnumber=". current_bnumber)
-call s:LOG("s:ProcessChange bnumber=". bnumber)
+"call s:LOG("s:ProcessChange current_bnumber=". current_bnumber)
+"call s:LOG("s:ProcessChange bnumber=". bnumber)
execute ''. bnumber ."b"
@@ -305,6 +305,11 @@ call s:LOG("vimside#command#refactor#Handler_Ok dic=". string(dic))
let changes = dic[':changes']
call s:ProcessChanges(changes)
+ elseif refactor_type == 'addImport'
+ " list of changes
+ let changes = dic[':changes']
+ call s:ProcessChanges(changes)
+
else
call s:ERROR("vimside#command#refactor#Handler_Ok: Bad refactor-type : ". string(refactor_type))
endif
@@ -315,21 +320,21 @@ endfunction
" return [found, [file, start, end]]
function! s:GetCWordSelection()
-call s:LOG("s:GetCWordSelection TOP")
+" call s:LOG("s:GetCWordSelection TOP")
let old_name = expand("<cword>")
let old_name_len = len(old_name)
-call s:LOG("s:GetCWordSelection old_name=". old_name)
+" call s:LOG("s:GetCWordSelection old_name=". old_name)
let line = line(".")
-call s:LOG("s:GetCWordSelection line=". line)
+" call s:LOG("s:GetCWordSelection line=". line)
let col = col(".")
let start = 0
let found = 0
let line_str = getline(line)
while ! found
let idx = stridx(line_str, old_name, start)
-call s:LOG("s:GetCWordSelection idx=". idx)
+" call s:LOG("s:GetCWordSelection idx=". idx)
if idx == -1
break
elseif idx <= col && col <= idx+old_name_len
@@ -340,7 +345,7 @@ call s:LOG("s:GetCWordSelection idx=". idx)
endif
endwhile
if idx == -1
-call s:LOG("s:GetCWordSelection idx=". idx)
+" call s:LOG("s:GetCWordSelection idx=". idx)
return [0, ["", -1, -1]]
endif
let offset_line = line2byte(line)
@@ -349,10 +354,10 @@ call s:LOG("s:GetCWordSelection idx=". idx)
let [found, fn] = vimside#util#GetCurrentFilename()
if ! found
-call s:LOG("s:GetCWordSelection NO FILE NAME")
+" call s:LOG("s:GetCWordSelection NO FILE NAME")
return [0, ["", -1, -1]]
else
-call s:LOG("s:GetCWordSelection fn=". fn)
+" call s:LOG("s:GetCWordSelection fn=". fn)
return [1, [fn, offset_start, offset_end]]
endif
endfunction
@@ -392,6 +397,40 @@ function! s:GetText(start, end)
endif
endfunction
+function! s:GetInput(prompt, ...)
+ let name = ''
+ let prompt = a:prompt .": > "
+
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ if a:0 == 1
+ let pattern = a:1
+"call s:LOG("s:GetInput: pattern=". pattern)
+ let got_name = 0
+ let name = input(prompt)
+ while ! got_name
+ if name == ''
+ let got_name = 1
+ else
+ let mname = matchstr(name, pattern)
+ if mname == name
+ let got_name = 1
+ else
+ echo "\r"
+ let name = input("Bad name:'". name ."'\nPattern: '". pattern."'\n". prompt)
+ endif
+ endif
+ endwhile
+ else
+ let name = input(prompt)
+ endif
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
+
+ echo "\r". repeat(' ', len(prompt)+len(name)+1)
+ return name
+endfunction
"=================================================
function! vimside#command#refactor#Rename()
@@ -421,31 +460,18 @@ call s:ERROR("vimside#command#refactor#Rename failed to get selection")
if ! found
throw "Option not found: "'tailor-refactor-rename-pattern-enable'"
endif
- let [found, pattern] = g:vimside.GetOption('tailor-refactor-rename-pattern')
- if ! found
- throw "Option not found: "'tailor-refactor-rename-pattern'"
- endif
+ let prompt = "Rename: '". old_name ."'"
if pattern_use
- let got_name = 0
- " let name_pattern = '[^ =:;()[\]]\+'
- let name = input("Rename: '". old_name . "' > ")
- while ! got_name
- if name == ''
- let got_name = 1
- else
- let mname = matchstr(name, pattern)
- if mname == name
- let got_name = 1
- else
- echo "\r"
- let name = input("Bad name:'". name ."'\nPattern: '". pattern ."'\nRename: '". old_name . "' > ")
- endif
- endif
- endwhile
+ let [found, pattern] = g:vimside.GetOption('tailor-refactor-rename-pattern')
+ if ! found
+ throw "Option not found: "'tailor-refactor-rename-pattern'"
+ endif
+
+ let name = s:GetInput(prompt, pattern)
else
- let name = input("Rename: '". old_name . "' > ")
- endif
+ let name = s:GetInput(prompt)
+ endif
if name == ''
return
@@ -540,31 +566,18 @@ call s:LOG("vimside#command#refactor#ExtractLocal offset_end=". offset_end)
if ! found
throw "Option not found: "'tailor-refactor-extract-local-pattern-enable'"
endif
- let [found, pattern] = g:vimside.GetOption('tailor-refactor-extract-local-pattern')
- if ! found
- throw "Option not found: "'tailor-refactor-extract-local-pattern'"
- endif
+ let prompt = "Extract Local"
if pattern_use
- let got_name = 0
- " let name_pattern = '[^ =:;()[\]]\+'
- let name = input("Extract Local: > ")
- while ! got_name
- if name == ''
- let got_name = 1
- else
- let mname = matchstr(name, pattern)
- if mname == name
- let got_name = 1
- else
- echo "\r"
- let name = input("Bad name:'". name ."'\nPattern: '". pattern."'\nExtract Local: > ")
- endif
- endif
- endwhile
+ let [found, pattern] = g:vimside.GetOption('tailor-refactor-extract-local-pattern')
+ if ! found
+ throw "Option not found: "'tailor-refactor-extract-local-pattern'"
+ endif
+
+ let name = s:GetInput(prompt, pattern)
else
- let name = input("Extract Local: > ")
- endif
+ let name = s:GetInput(prompt)
+ endif
if name == ''
return
@@ -610,31 +623,18 @@ call s:LOG("vimside#command#refactor#ExtractMethod NO FILE")
if ! found
throw "Option not found: "'tailor-refactor-extract-method-pattern-enable'"
endif
- let [found, pattern] = g:vimside.GetOption('tailor-refactor-extract-method-pattern')
- if ! found
- throw "Option not found: "'tailor-refactor-extract-method-pattern'"
- endif
+ let prompt = "Extract Method"
if pattern_use
- let got_name = 0
- " let name_pattern = '[^ =:;()[\]]\+'
- let name = input("Extract Method: > ")
- while ! got_name
- if name == ''
- let got_name = 1
- else
- let mname = matchstr(name, pattern)
- if mname == name
- let got_name = 1
- else
- echo "\r"
- let name = input("Bad name:'". name ."'\nPattern: '". pattern ."'\nMethod Local: > ")
- endif
- endif
- endwhile
+ let [found, pattern] = g:vimside.GetOption('tailor-refactor-extract-method-pattern')
+ if ! found
+ throw "Option not found: "'tailor-refactor-extract-method-pattern'"
+ endif
+
+ let name = s:GetInput(prompt, pattern)
else
- let name = input("Extract Method: > ")
- endif
+ let name = s:GetInput(prompt)
+ endif
if name == ''
return
@@ -724,8 +724,188 @@ call s:LOG("vimside#command#refactor#InlineLocal offset_end=". offset_end)
call s:LOG("vimside#command#refactor#InlineLocal BOTTOM")
endfunction
-function! vimside#command#refactor#AddImportTypeAtPoint()
-call s:LOG("vimside#command#refactor#AddImportTypeAtPoint TOP")
-call s:LOG("vimside#command#refactor#AddImportTypeAtPoint BOTTOM")
+function! vimside#command#refactor#AddImport()
+call s:LOG("vimside#command#refactor#AddImport: TOP")
+
+ let name = s:GetInput("Enter Import")
+ if name != ''
+ call s:DoAddImport(name)
+ endif
+
+call s:LOG("vimside#command#refactor#AddImport: BOTTOM")
endfunction
+function! s:DoAddImport(name)
+
+ let [found, fn] = vimside#util#GetCurrentFilename()
+ if ! found
+call s:LOG("vimside#command#refactor#AddImport NO FILE")
+ return
+ endif
+
+
+ let l:procedure_id = s:procedure_id
+ let s:procedure_id += 1
+
+ let args = {}
+ let args['procedure_id'] = procedure_id
+ let args['symbol'] = 'addImport'
+ let args['params'] = [
+ \ 'file', fn,
+ \ 'start', 0,
+ \ 'end', 0,
+ \ 'qualifiedName', a:name
+ \ ]
+
+ let info = {
+ \ 'handler': {
+ \ 'ok': function("vimside#command#refactor#Handler_Ok")
+ \ },
+ \ 'args': args
+ \ }
+
+ call vimside#swank#rpc#prepare_refactor#Run(info)
+
+endfunction
+
+
+
+
+
+
+
+
+
+
+function! vimside#command#refactor#ImportSuggestionHandler_Ok(dic, ...)
+call s:LOG("vimside#command#refactor#ImportSuggestionHandler_Ok TOP")
+ let dic = a:dic
+"call s:LOG("vimside#command#refactor#ImportSuggestionHandler_Ok dic=". string(dic))
+ if type(dic) != type([])
+ call s:ERROR("vimside#command#refactor#ImportSuggestionHandler_Ok: Result not list: ". string(dic))
+ return
+ endif
+ let name_list = dic[0]
+
+ if type(name_list) != type([])
+ call s:ERROR("vimside#command#refactor#ImportSuggestionHandler_Ok: Not list of Dictionaries: ". string(name_list))
+ return
+ endif
+
+ let echos = ''
+ let nlen = len(name_list)
+ let cnt = 1
+ while cnt <= nlen
+ if cnt > 1
+ let echos .= "\n"
+ endif
+ let entry = name_list[cnt-1]
+
+ let l = ''
+ if cnt < 10
+ let l .= ' '
+ endif
+ let l .= cnt
+ let l .= ' "'
+ if has_key(entry, ':name')
+ let l .= entry[':name']
+ else
+ let l .= 'ERROR'
+ endif
+ let l .= '"'
+
+" call s:LOG("vimside#command#refactor#ImportSuggestionHandler_Ok l=". l)
+ " echo l
+ let echos .= l
+
+ let cnt += 1
+ endwhile
+
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ while 1
+ let rval = input(echos . "\nType number and <Enter> (empty cancels): ")
+ if rval == ''
+ break
+ endif
+ let n = 0 + rval
+ let s = '' . n
+ if s != rval
+ echo "Bad number: " . rval
+ else
+ if n < 1
+ echo "Number less than 1: " . rval
+ elseif n > nlen
+ echo "Number greater than: " . nlen
+ else
+ break
+ endif
+ endif
+ redraw
+ endwhile
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
+
+ if rval != ''
+ let entry = name_list[n-1]
+ let name = entry[':name']
+ call s:DoAddImport(name)
+ endif
+
+if 0
+ redraw
+ if rval == ''
+ echo "\r"
+ else
+ let entry = name_list[n-1]
+ echo "\rName: " . entry[':name']
+ endif
+endif
+endfunction
+
+function! vimside#command#refactor#ImportSuggestions()
+call s:LOG("vimside#command#refactor#ImportSuggestions: TOP")
+
+ let [found, fn] = vimside#util#GetCurrentFilename()
+ if ! found
+call s:LOG("vimside#command#refactor#ImportSuggestions NO FILE")
+ return
+ endif
+
+ let [found, offset_start, offset_end] = vimside#command#GetVisualSelection()
+ if ! found
+ let [found, slist] = vimside#command#selection#Get()
+ if ! found
+ let [found, slist] = s:GetCWordSelection()
+ if ! found
+call s:ERROR("vimside#command#refactor#ImportSuggestions failed to get selection")
+ return
+ endif
+ endif
+ let [fn, offset_start, offset_end] = slist
+ endif
+
+ let name = s:GetText(offset_start, offset_end)[0]
+call s:LOG("vimside#command#refactor#ImportSuggestions name=". name)
+
+ let l:procedure_id = s:procedure_id
+ let s:procedure_id += 1
+
+ let args = {}
+ let args['filename'] = fn
+ let args['offset'] = offset_start
+ let args['names'] = [ name ]
+ let args['maximum'] = 10
+
+ let info = {
+ \ 'handler': {
+ \ 'ok': function("vimside#command#refactor#ImportSuggestionHandler_Ok")
+ \ },
+ \ 'args': args
+ \ }
+
+ call vimside#swank#rpc#import_suggestions#Run(info)
+
+call s:LOG("vimside#command#refactor#ImportSuggestions: BOTTOM")
+endfunction
View
303 autoload/vimside/command/search.vim
@@ -15,7 +15,8 @@ let s:ERROR = function("vimside#log#error")
let s:close_list_when_empty_option = 0
-let s:do_incremental_search_option = 1
+let s:do_incremental_search_option = 0
+let s:maximum_return = 50
let s:words = []
let s:list_display_open = 0
@@ -29,13 +30,22 @@ function! s:Init()
throw "Option not found: "'tailor-symbol-search-close-empty-display'"
endif
let s:close_list_when_empty_option = value
+ unlet value
let [found, value] = g:vimside.GetOption('tailor-symbol-search-do-incremental')
if ! found
throw "Option not found: "'tailor-symbol-search-do-incremental'"
endif
let s:do_incremental_search_option = value
+ unlet value
+
+ let [found, value] = g:vimside.GetOption('tailor-symbol-search-maximum-return')
+ if ! found
+ throw "Option not found: "'tailor-symbol-search-maximum-return'"
+ endif
+
+ let s:maximum_return = value
call setqflist([])
endfunction
@@ -44,7 +54,7 @@ endfunction
function! s:AddToRecord()
call s:LOG("s:AddToRecord: TOP")
let new_word_list = split(s:line, ' ')
-call s:LOG("s:AddToRecord: new_word_list=". string(new_word_list))
+" call s:LOG("s:AddToRecord: new_word_list=". string(new_word_list))
let wslen = len(s:words)
let nwlen = len(new_word_list)
@@ -105,23 +115,197 @@ call s:LOG("s:AddToRecord: new_word_list=". string(new_word_list))
let s:words = words
-call s:LOG("s:AddToRecord: s:words=". string(s:words))
-call s:LOG("s:AddToRecord: gotnew; ". gotnew)
+" call s:LOG("s:AddToRecord: s:words=". string(s:words))
+" call s:LOG("s:AddToRecord: gotnew; ". gotnew)
if gotnew
let dic = {
\ 'args': {
- \ 'terms': copy(s:words)
+ \ 'terms': copy(s:words),
+ \ 'maximum': s:maximum_return
\ }
\ }
call vimside#swank#rpc#public_symbol_search#Run(dic)
endif
-call s:LOG("s:AddToRecord: BOTTOM")
+" call s:LOG("s:AddToRecord: BOTTOM")
return gotnew
endfunction
+function! s:ResultSorterByNameLength(e1, e2)
+ let name1 = a:e1[':name']
+ let name2 = a:e2[':name']
+ return len(name1) > len(name2) ? 1 : -1
+endfunction
+
+function! s:ResultSorterByClass(e1, e2)
+ let e1 = a:e1
+ let e2 = a:e2
+
+ let t1 = -1
+ let decl_as = e1[':decl-as']
+ if decl_as == 'class'
+ let n1 = e1[':name']
+ let t1 = 0
+ elseif decl_as == 'trait'
+ let n1 = e1[':name']
+ let t1 = 0
+ elseif decl_as == 'interface'
+ let n1 = e1[':name']
+ let t1 = 0
+ elseif decl_as == 'object'
+ let n1 = e1[':name']
+ let t1 = 0
+ elseif decl_as == 'method'
+ if has_key(e1, ':owner-name')
+ let n1 = e1[':owner-name']
+ else
+ let n1 = e1[':name']
+ endif
+ let t1 = 1
+ elseif decl_as == 'field'
+ if has_key(e1, ':owner-name')
+ let n1 = e1[':owner-name']
+ else
+ let n1 = e1[':name']
+ endif
+ let t1 = 2
+ else
+ let n1 = e1[':name']
+ let t1 = 3
+ endif
+
+ let t2 = -1
+ let decl_as = e2[':decl-as']
+ if decl_as == 'class'
+ let n2 = e2[':name']
+ let t2 = 0
+ elseif decl_as == 'trait'
+ let n2 = e2[':name']
+ let t2 = 0
+ elseif decl_as == 'interface'
+ let n2 = e2[':name']
+ let t2 = 0
+ elseif decl_as == 'object'
+ let n2 = e2[':name']
+ let t2 = 0
+ elseif decl_as == 'method'
+ if has_key(e2, ':owner-name')
+ let n2 = e2[':owner-name']
+ else
+ let n2 = e2[':name']
+ endif
+ let t2 = 1
+ elseif decl_as == 'field'
+ if has_key(e2, ':owner-name')
+ let n2 = e2[':owner-name']
+ else
+ let n2 = e2[':name']
+ endif
+ let t2 = 2
+ else
+ let n2 = e2[':name']
+ let t2 = 3
+ endif
+
+ if n1 == n2 " class names the same, class before method before field
+ if t1 < t2
+ return -1
+ elseif t2 < t1
+ return 1
+ else
+ let ln1 = e1[':local-name']
+ let ln2 = e2[':local-name']
+ if ln1 == ln2 " local names the same
+ return 0
+ elseif ln1 < ln2
+ return -1
+ else
+ return 1
+ endif
+
+ endif
+ else " class names not the same, shorter class first
+ let l1 = len(n1)
+ let l2 = len(n2)
+
+ if l1 < l2
+ return -1
+ elseif l2 < l1
+ return 1
+ elseif n1 < n2
+ return -1
+ else
+ return 1
+ endif
+ endif
+endfunction
+
+
+function! vimside#command#search#ProcessSymbolSearchResults(results)
+ let results = a:results
+
+ let records = []
+ let cnt = 0
+ for item in sort(results, function("s:ResultSorterByClass"))
+ let pos = item[':pos']
+ let file = pos[':file']
+ let offset = pos[':offset']
+ let name = item[':name']
+"call s:LOG("ProcessSymbolSearchResults name=". string(name))
+
+
+ let decl_as = item[':decl-as']
+ let text = ''. decl_as .':'
+
+ if decl_as == 'class'
+ let text .= name
+ elseif decl_as == 'trait'
+ let text .= name
+ elseif decl_as == 'interface'
+ let text .= name
+ elseif decl_as == 'object'
+ let text .= name
+ elseif decl_as == 'method'
+ if has_key(item, ':owner-name')
+ let owner_name = item[':owner-name']
+ let local_name = item[':local-name']
+ let text .= owner_name .':'. local_name
+ else
+ let text .= name
+ endif
+ elseif decl_as == 'field'
+ if has_key(item, ':owner-name')
+ let owner_name = item[':owner-name']
+ let local_name = item[':local-name']
+ let text .= owner_name .':'. local_name
+ else
+ let text .= name
+ endif
+ else
+ let text .= name
+ endif
+
+ let [line, column] = vimside#util#GetLineColumnFromOffset(offset, file)
+
+ let record = {}
+ let record['filename'] = file
+ let record['lnum'] = line
+ let record['col'] = column
+ let record['vcol'] = 1
+ let record['text'] = text
+ let record['type'] = 'r'
+ let record['nr'] = cnt
+
+ call add(records, record)
+
+ let cnt += 1
+ endfor
+
+ call vimside#command#search#AddRecords(records)
+endfunction
+
function! vimside#command#search#AddRecords(records)
if empty(a:records) && s:close_list_when_empty_option
if s:list_display_open
@@ -136,6 +320,7 @@ function! vimside#command#search#AddRecords(records)
copen
setlocal nonu
setlocal nocursorline
+ setlocal nocursorcolumn
endif
endif
@@ -149,63 +334,73 @@ function! s:DisplayText()
endfunction
function! vimside#command#search#Run()
-call s:LOG("vimside#command#search#Run TOP")
- call s:Init()
- let s:list_display_open = 0
-
- let s:line = ''
- call s:DisplayText()
- while 1
- let check_add = 0
- let nr = getchar()
- let c = nr2char(nr)
- if c == "\<CR>"
- echo "\r"
- if ! s:do_incremental_search_option && len(s:line) >= s:min_chars
- call s:AddToRecord()
- endif
- break
-
- elseif c == "\<Esc>"
- cclose
- redraw
- return
-
- elseif c == ' '
- let llen = len(s:line)
- if llen >= s:min_chars && s:line[llen-1] != ' '
- let s:line .= c
- let check_add = 1
- endif
+" call s:LOG("vimside#command#search#Run TOP")
+ call vimside#scheduler#HaltFeedKeys()
+
+ try
+
+ call s:Init()
+ let s:list_display_open = 0
+
+ let s:line = ''
+ call s:DisplayText()
+ while 1
+ let check_add = 0
+ let nr = getchar()
+ let c = nr2char(nr)
+ if c == "\<CR>"
+ echo "\r"
+ if ! s:do_incremental_search_option && len(s:line) >= s:min_chars
+ call s:DisplayText()
+ call s:AddToRecord()
+ endif
+ break
+
+ elseif c == "\<Esc>"
+ cclose
+ redraw
+ return
+
+ elseif c == ' '
+ let llen = len(s:line)
+ if llen >= s:min_chars && s:line[llen-1] != ' '
+ let s:line .= c
+ let check_add = 1
+ endif
- elseif nr == "\<Del>" || nr == "\<BS>"
+ elseif nr == "\<Del>" || nr == "\<BS>"
" call s:LOG("vimside#command#search#Run BS")
- let llen = len(s:line)
+ let llen = len(s:line)
" call s:LOG("vimside#command#search#Run s:line=". s:line)
" call s:LOG("vimside#command#search#Run llen=". llen)
- if llen == 1
- let s:line = ''
+ if llen == 1
+ let s:line = ''
" call s:LOG("vimside#command#search#Run XX s:line=". s:line)
- elseif llen > 1
- let s:line = s:line[0: llen-2]
+ elseif llen > 1
+ let s:line = s:line[0: llen-2]
" call s:LOG("vimside#command#search#Run YY s:line=". s:line)
+ endif
+ let check_add = 1
+
+ elseif nr >= 32 && nr < 127
+ let s:line .= c
+ let check_add = 1
endif
- let check_add = 1
-
- elseif nr >= 32 && nr < 127
- let s:line .= c
- let check_add = 1
- endif
- if check_add
- if s:do_incremental_search_option
- call s:AddToRecord()
+ if check_add
+ call s:DisplayText()
+ if s:do_incremental_search_option
+ call s:AddToRecord()
+ endif
endif
- call s:DisplayText()
- endif
-call s:LOG("s:IO: s:line; ". s:line)
- endwhile
+"call s:LOG("s:IO: s:line; ". s:line)
+ endwhile
+
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
+
-call s:LOG("vimside#command#search#Run BOTTOM")
+" call s:LOG("vimside#command#search#Run BOTTOM")
endfunction
View
9 autoload/vimside/ensime/swank.vim
@@ -135,13 +135,8 @@ call s:LOG("vimside#ensime#swank#ping_info_set_rpc_expecting")
" XXXXXXXXXXXXX
" call vimside#ResetAutoCmds()
call vimside#scheduler#ResetAuto()
- if mode() == 'i'
- call feedkeys("a\<BS>")
- elseif mode() == 'c'
- call feedkeys("\<SPACE>")
- else
- call feedkeys("f\e")
- endif
+
+ call vimside#scheduler#FeedKeys()
endfunction
function! vimside#ensime#swank#ping_info_set_rpc_not_expecting()
View
7 autoload/vimside/forms/menu.vim
@@ -625,7 +625,12 @@ function! vimside#forms#menu#MakePopUp(mode) range
let s:popupform = forms#newForm(attrsForm)
endif
- call s:popupform.run()
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ call s:popupform.run()
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
endfunction
View
8 autoload/vimside/forms/optioneditor.vim
@@ -454,6 +454,12 @@ endif
\ 'body': bg
\ }
let form = forms#newForm(attrs)
- call form.run()
+
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ call form.run()
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
endfunction
View
9 autoload/vimside/forms/sourcebrowser.vim
@@ -227,7 +227,14 @@ call forms#log("NODE SELECT: ". a:node.name)
\ 'body': bg
\ }
let form = forms#newForm(attrs)
- let rval = form.run()
+
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ let rval = form.run()
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
+
" call s:LOG("rval=". string(rval))
if type(rval) == g:self#DICTIONARY_TYPE
View
3 autoload/vimside/options/default.vim
@@ -190,7 +190,8 @@ function! vimside#options#default#Load(owner)
call owner.Set("tailor-symbol-search-close-empty-display", 0)
- call owner.Set("tailor-symbol-search-do-incremental", 1)
+ call owner.Set("tailor-symbol-search-do-incremental", 0)
+ call owner.Set("tailor-symbol-search-maximum-return", 50)
call owner.Set("tailor-expand-selection-information", 'highlight')
call owner.Set("tailor-expand-selection-highlight-color-dark", '5fffff')
View
11 autoload/vimside/options/defined.vim
@@ -446,7 +446,7 @@ function! s:MakeOptions()
\ 'Scala version Ensime was built with and possible the Ensime.',
\ 'version. For example, ',
\ ' "dist_2.9.2" or "ensime_2.9.2-0.9.8.1" or',
- \ ' "ensime_2.10.0-SNAPSHOT-0.9.7"'
+ \ ' "ensime_2.10.0-RC3-0.9.8.2"'
\ ]
\ }
let l:options['ensime-dist-path'] = {
@@ -1786,6 +1786,15 @@ function! s:MakeOptions()
\ "As search terms are entered, search results are displayed."
\ ]
\ }
+ let l:options['tailor-symbol-search-maximum-return'] = {
+ \ 'name': 'tailor-symbol-search-maximum-return',
+ \ 'type': g:OPTION_NUMBER_TYPE,
+ \ 'scope': g:OPTION_DYNAMIC_SCOPE,
+ \ 'description': [
+ \ "For 'swank:public-symbol-search' do incremental search.",
+ \ "Maximum search results returned by Ensime."
+ \ ]
+ \ }
let l:options['tailor-expand-selection-information'] = {
\ 'name': 'tailor-expand-selection-information',
View
14 autoload/vimside/plugin/sourcebrowser.vim
@@ -2023,7 +2023,7 @@ function! s:FilePanel_mark_via_regexp(regexp) dict
let fview = self
if a:regexp == ''
echohl Special
- let regexp = input("Mark files (regexp): ")
+ let regexp = vimside#util#Input("Mark files (regexp): ")
echohl None
else
let regexp = a:regexp
@@ -2057,7 +2057,7 @@ let s:FilePanel.markExecutable = function("s:FilePanel_mark_executable")
function! s:FilePanel_new_file() dict
let fview = self
echohl Special
- let filename = input("Create file : ", fview.path, "file")
+ let filename = vimside#util#Input("Create file : ", fview.path, "file")
echohl None
if filename == ''
echo " "
@@ -2078,7 +2078,7 @@ function! s:FilePanel_new_directory() dict
echoerr "mkdir feature not found!"
endif
echohl Special
- let dirname = input("Create directory : ", fview.path, "file")
+ let dirname = vimside#util#Input("Create directory : ", fview.path, "file")
echohl None
if dirname == ''
echo " "
@@ -2098,7 +2098,7 @@ function! s:FilePanel_rename(line) dict
let path = fview.displayList[a:line][1]
if path != ''
echohl Special
- let name = input("Rename to: ", path, "file")
+ let name = vimside#util#Input("Rename to: ", path, "file")
echohl None
if name == ''
@@ -2122,7 +2122,7 @@ let s:FilePanel.rename = function("s:FilePanel_rename")
function! s:FilePanel_search() dict
let fview = self
echohl Special
- let filename = input("Search : ")
+ let filename = vimside#util#Input("Search : ")
echohl None
if filename == ''
@@ -2495,7 +2495,7 @@ call s:LOG("VENew: path '". a:path ."', sourceRoots= ". string(a:sourceRoots))
if a:path == ''
echohl Special
- let workPath = input("VimExplorer (directory): ", l:sourceRoots[0], "file")
+ let workPath = vimside#util#Input("VimExplorer (directory): ", l:sourceRoots[0], "file")
echohl None
else
let workPath = a:path
@@ -2889,7 +2889,7 @@ endfunction
function! VE_OpenPath()
call s:LOG("VE_OpenPath:")
echohl Special
- let workPath = input("Change path to (directory): ", '', "file")
+ let workPath = vimside#util#Input("Change path to (directory): ", '', "file")
echohl None
if workPath == ''
return
View
27 autoload/vimside/scheduler.vim
@@ -26,6 +26,8 @@ let s:ERROR = function("vimside#log#error")
"=============================================================================
let s:jobs = []
+let s:outputfeedkeys = 1
+
function! vimside#scheduler#ClearJobs()
let s:jobs = []
endfunction
@@ -184,12 +186,27 @@ function! vimside#scheduler#TimeTrigger()
" One of the jobs might have added a job so we add to s:jobs
let s:jobs += l:jobs
- if mode() == 'i'
- call feedkeys("a\<BS>", 'n')
- else
- call feedkeys("f\e", 'n')
- endif
+ call vimside#scheduler#FeedKeys()
+endfunction
+
+function! vimside#scheduler#HaltFeedKeys()
+ let s:outputfeedkeys = 0
+endfunction
+function! vimside#scheduler#ResumeFeedKeys()
+ let s:outputfeedkeys = 1
+endfunction
+function! vimside#scheduler#FeedKeys()
+" call s:LOG("FeedKeys: mode=". mode())
+ if s:outputfeedkeys
+ if mode() == 'i'
+ call feedkeys("a\<BS>", 'n')
+ elseif mode() == 'c'
+ call feedkeys("\<SPACE>\<BS>", 'n')
+ else
+ call feedkeys("f\e", 'n')
+ endif
+ endif
endfunction
function! vimside#scheduler#GetRealTime()
View
28 autoload/vimside/swank/rpc/import_suggestions.vim
@@ -54,11 +54,7 @@ call s:LOG("import_suggestions TOP")
let l:args = { }
let l:rr = vimside#swank#rpc#util#MakeRPCEnds(s:Caller, l:args, s:Handler, a:000)
- " call vimside#ensime#swank#dispatch(l:rr)
-
- let msg = "Not Implemented Yet:" . 'swank-rpc-import-suggestions-handler'
- call s:ERROR(msg)
- echoerr msg
+ call vimside#ensime#swank#dispatch(l:rr)
call s:LOG("import_suggestions BOTTOM")
endfunction
@@ -71,7 +67,27 @@ endfunction
function! g:ImportSuggestionsCaller(args)
let cmd = "swank:import-suggestions"
- return '('. cmd .')'
+ let fn = a:args.filename
+ let offset = a:args.offset
+ let names = a:args.names
+ let max = a:args.maximum
+
+ let nlen = len(names)
+ let cnt = 0
+ let ns = '('
+ while cnt < nlen
+ let ns .= '"'
+ let ns .= names[cnt]
+ let ns .= '"'
+ if cnt+1 != nlen
+ let ns .= ' '
+ endif
+
+ let cnt += 1
+ endwhile
+ let ns .= ')'
+
+ return '('. cmd .' "'. fn .'" '. offset .' '. ns .' '. max .')'
endfunction
View
6 autoload/vimside/swank/rpc/public_symbol_search.vim
@@ -111,14 +111,17 @@ function! g:PublicSymbolSearchHandler()
return 0
endif
+ call vimside#command#search#ProcessSymbolSearchResults(dic)
+
+if 0
let records = []
let cnt = 0
for item in dic
let pos = item[':pos']
let file = pos[':file']
let offset = pos[':offset']
let name = item[':name']
-"call s:LOG("PublicSymbolSearchHandler_Ok name=". string(name))
+call s:LOG("PublicSymbolSearchHandler_Ok name=". string(name))
let decl_as = item[':decl-as']
let local_name = item[':local-name']
let [line, column] = vimside#util#GetLineColumnFromOffset(offset, file)
@@ -142,6 +145,7 @@ function! g:PublicSymbolSearchHandler()
endfor
call vimside#command#search#AddRecords(records)
+endif
return 1
endfunction
View
31 autoload/vimside/util.vim
@@ -46,15 +46,20 @@ function! vimside#util#GetLineColumnFromOffset(offset, ...)
endif
else
let file = a:1
- try
- execute "sp ". file
- let line = byte2line(a:offset)
- let offline = line2byte(line)
- let column = a:offset - offline
- return [line, column]
- finally
- q
- endtry
+ let extension = fnamemodify(file, ":e")
+ if extension != 'scala' && extension != 'java'
+ return [-1, -1]
+ else
+ try
+ execute "sp ". file
+ let line = byte2line(a:offset)
+ let offline = line2byte(line)
+ let column = a:offset - offline
+ return [line, column]
+ finally
+ q
+ endtry
+ endif
endif
endfunction
@@ -171,5 +176,13 @@ function! vimside#util#TypeNameFromTypeNumber(typeNum)
endfunction
+function! vimside#util#Input(msg)
+ call vimside#scheduler#HaltFeedKeys()
+ try
+ return input(a:msg)
+ finally
+ call vimside#scheduler#ResumeFeedKeys()
+ endtry
+endfunction
View
2 autoload/vimside/version.vim
@@ -12,7 +12,7 @@
let s:version_major = 0
let s:version_minor = 2
-let s:version_patch = 11
+let s:version_patch = 12
let s:version_pre_release = ''
" build version is not applicable
View
2 data/vimside/_ensime
@@ -49,7 +49,6 @@
:formatting-prefs (:alignParameters t
:alignSingleLineCaseStatements nil
;; :alignSingleLineCaseStatements_maxArrowIndent 20
- :compactControlReadability t
:compactStringConcatenation t
:doubleIndentClassDeclaration t
:indentLocalDefs nil
@@ -58,7 +57,6 @@
:indentWithTabs nil
:multilineScaladocCommentsStartOnFirstLine nil
:preserveDanglingCloseParenthesis t
- :placeScaladocAsterisksBeneathSecondAsterisk nil
:preserveSpaceBeforeArguments nil
:rewriteArrowSymbols nil
:spaceBeforeColon nil
View
5 data/vimside/ensime_config.vim
@@ -41,7 +41,6 @@ let formatting_prefs = g:SExp(
\ Key(":alignParameters"), g:Bool(1),
\ Key(":alignSingleLineCaseStatements"), g:Bool(0),
\ Key(":compactStringConcatenation"), g:Bool(1),
- \ Key(":compactControlReadability"), g:Bool(1),
\ Key(":doubleIndentClassDeclaration"), g:Bool(1),
\ Key(":indentLocalDefs"), g:Bool(0),
\ Key(":indentPackageBlocks"), g:Bool(0),
@@ -51,7 +50,6 @@ let formatting_prefs = g:SExp(
\ )
call vimside#sexp#AddTo_List(formatting_prefs,
- \ Key(":placeScaladocAsterisksBeneathSecondAsterisk"), g:Bool(0),
\ Key(":preserveDanglingCloseParenthesis"), g:Bool(1),
\ Key(":preserveSpaceBeforeArguments"), g:Bool(0),
\ Key(":rewriteArrowSymbols"), g:Bool(0),
@@ -61,14 +59,15 @@ call vimside#sexp#AddTo_List(formatting_prefs,
\ Key(":spacesWithinPatternBinders"), g:Bool(1)
\ )
+" Key(":disable-index-on-startup"), g:Bool(0),
+
let g:ensime_config = g:SExp([
\ Key(":root-dir"), g:Str(s:full_dir),
\ Key(":name"), g:Str("test"),
\ Key(":package"), g:Str("com.megaannum"),
\ Key(":version"), g:Str("1.0"),
\ Key(":compile-jars"), compile_jars,
\ Key(":compiler-args"), compiler_args,
- \ Key(":disable-index-on-startup"), g:Bool(0),
\ Key(":source-roots"), source_roots,
\ Key(":reference-source-roots"), reference_source_roots,
\ Key(":target"), g:Str(s:full_dir . "/build/classes"),
View
4 data/vimside/example_options_project.vim
@@ -6,7 +6,7 @@
" 'vimside-project-options-user-file-name'
" and add Option setter calls, e.g.:
" call owner.Set("vimside-scala-version", "2.10.0")
-" call owner.Set("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+" call owner.Set("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
" call owner.Set("ensime-config-file-name", "_ensime")
" These Option values will be used to configure Vimside and can be
" project specific
@@ -25,7 +25,7 @@ function! g:VimsideOptionsProjectLoad(owner)
" call owner.Set("vimside-log-enabled", 1)
" call owner.Update("vimside-scala-version", "2.10.0")
- " call owner.Update("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ " call owner.Update("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
" call owner.Update("ensime-config-file-name", "_ensime")
" call owner.Set("forms-use", 1)
View
3 data/vimside/example_options_user.vim
@@ -50,7 +50,7 @@ function! g:VimsideOptionsUserLoad(owner)
" Which build version of Ensime to use.
" Must be directory under 'ensime-install-path' directory
" call owner.Set("ensime-dist-dir", "ensime_2.9.2-0.9.8.1")
- " call owner.Set("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ " call owner.Set("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
" Or, full path to Ensime build version
" call owner.Set("ensime-dist-path", "SOME_PATH_TO_ENSIME_BUILD_DIR")
@@ -110,6 +110,7 @@ function! g:VimsideOptionsUserLoad(owner)
" Search options
" call owner.Set("tailor-symbol-search-do-incremental", 0)
" call owner.Set("tailor-symbol-search-close-empty-display", 1)
+ " call owner.Set("tailor-symbol-search-maximum-return", 50)
"--------------
"--------------
View
25 doc/vimside.txt
@@ -1,7 +1,7 @@
*vimside.txt* For Vim version 7.3 Last change: 2012
Author: Richard Emberson
-Version: 0.2.11
+Version: 0.2.12
Title: Vimside: Vim Scala IDE
Homepage: TODO
@@ -211,9 +211,9 @@ ensime_2.9.2-0.9.8.1 as an example:
lib/
README.md
-or ensime_2.10.0-SNAPSHOT-0.9.7:
+or ensime_2.10.0-RC3-0.9.8.2:
- ensime_2.10.0-SNAPSHOT-0.9.7/
+ ensime_2.10.0-RC3-0.9.8.2/
bin/
elisp/
lib/
@@ -226,7 +226,7 @@ ensime_2.9.2-0.9.8.1 (the default value):
call owner.Set("vimside-scala-version", "2.9.2")
-and for ensime_2.10.0-SNAPSHOT-0.9.7:
+and for ensime_2.10.0-RC3-0.9.8.2:
call owner.Set("vimside-scala-version", "2.10.0")
@@ -271,7 +271,7 @@ For example:
call owner.Set("ensime-dist-dir", "ensime_2.9.2-0.9.8.1")
or
- call owner.Set("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ call owner.Set("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
Alternatively, you can specify the full path to the ensime distribution
using the Option 'ensime-dist-path'. As an example, if you installed
@@ -441,7 +441,7 @@ So, in the 'options_user.vim' one might have:
in a project file there might be:
call owner.Update("vimside-scala-version", "2.10.0")
- call owner.Update("ensime-dist-dir", "ensime_2.10.0-SNAPSHOT-0.9.7")
+ call owner.Update("ensime-dist-dir", "ensime_2.10.0-RC3-0.9.8.2")
call owner.Update("ensime-config-file-name", "_ensime")
@@ -1133,7 +1133,8 @@ Organize imports.
Extract local.
Extract method.
Inline local.
-Not implemented yet: Add import for type at point.
+Add import for type at point.
+Import suggestions
Useful.
@@ -1405,6 +1406,16 @@ rr = {
==============================================================================
10. Release notes *vimside-release-notes*
+0.2.12 - Fix: ~
+ Added Imports (add/suggest) Refactoring command.
+ Fixed Search command interaction with Time-base scheduler.
+ Fixed Search display of entered text prior to calling Ensime.
+ Fixed Search command result sorting.
+ Search now non-incremental by default.
+ Add Search Option allowing the setting for number of results:
+ 'tailor-symbol-search-maximum-return'
+ Fixed Ensime config so that indexing is allowed on startup by default.
+ Upgraded doc and example configs for Ensime Scala 2.10-RC3 build.
0.2.11 - Fix: ~
Add Refactor Options to validate allowed/disallow identifier names:
"tailor-refactor-rename-pattern-enable"
View
6 plugin/vimside.vim
@@ -189,9 +189,11 @@ else
autocmd FileType scala vmap <silent> <Leader>ri :call vimside#command#RefactorInlineLocal('v')<CR>
" t Add import for type at point.
- " autocmd FileType scala nmap <silent> <Leader>rt :call vimside#command#RefactorAddImportTypeAtPoint()<CR>
- " NOT IMPLEMENTED YET
+ autocmd FileType scala nmap <silent> <Leader>rt :call vimside#command#RefactorAddImport()<CR>
+ autocmd FileType scala nmap <silent> <Leader>vi :call vimside#command#ImportSuggestions('n')<CR>
+ autocmd FileType scala vmap <silent> <Leader>vi :call vimside#command#ImportSuggestions('v')<CR>
+
" C-c C-b x
" Where x is one of:
" b Build the entire project.

0 comments on commit c63625d

Please sign in to comment.