Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version 0.7.2

Added autodetection for /usr/local/bin/clojure on Linux, added special characters to Lisp keyword selection (iskeyword), run Vim's original ftplugin/lisp.vim for Clojure filetype, bugfixes: PareditWrap error when g:paredit_shortmaps=1 (thanks to Jon Thacker), buffer selection problems in case of three of more buffers (thanks to Philipp Marek), conflicting keybindings for SlimvGenerateTags, unmap error messages when g:paredit_mode=0.
  • Loading branch information...
commit b3c2b7facd0d4fb49b2df1fd923fcf9966f610fc 1 parent eb292ca
@kovisoft kovisoft authored vim-scripts committed
View
16 doc/slimv.txt
@@ -1,7 +1,7 @@
-*slimv.txt* Slimv Last Change: 07 Nov 2010
+*slimv.txt* Slimv Last Change: 16 Nov 2010
Slimv *slimv*
- Version 0.7.1
+ Version 0.7.2
The Superior Lisp Interaction Mode for Vim.
This plugin is aimed to help Lisp development by interfacing between Vim and
@@ -1316,6 +1316,16 @@ FAQ *slimv-faq*
===============================================================================
CHANGE LOG *slimv-changelog*
+0.7.2 - Added autodetection for /usr/local/bin/clojure on Linux.
+ - Added special characters to Lisp keyword selection (iskeyword).
+ - Run Vim's original ftplugin/lisp.vim for Clojure filetype.
+ - Bugfix: PareditWrap error when g:paredit_shortmaps=1 (thanks to
+ Jon Thacker).
+ - Bugfix: buffer selection problems in case of three of more buffers
+ (thanks to Philipp Marek).
+ - Bugfix: conflicting keybindings for SlimvGenerateTags.
+ - Bugfix: unmap error messages when g:paredit_mode=0.
+
0.7.1 - Added option g:slimv_browser_cmd for opening hyperspec in a custom
webbrowser (on behalf of Andreas Salwasser).
- Added paredit handling for d<motion>, c<motion>, p and P commands:
@@ -1500,7 +1510,7 @@ Common Lisp Hyperspec lookup packages for SLIME, and thanks to
Taylor R. Campbell for the Emacs paredit.el script.
Thanks to the Vim community for testing, commenting and patching the script,
especially to Philipp Marek, Vlad Hanciuta, Marcin Fatyga, Dmitry Petukhov,
-Daniel Solano G�mez, Brian Kropf, Len Weincier, Andreas Salwasser.
+Daniel Solano G�mez, Brian Kropf, Len Weincier, Andreas Salwasser, Jon Thacker.
Last but not least many thanks to my wife Andrea (for the Italians out there:
hey, this is a female name in Hungary :) for her support and patience.
View
10 ftplugin/clojure/slimv-clojure.vim
@@ -1,7 +1,7 @@
" slimv-clojure.vim:
" Clojure filetype plugin for Slimv
-" Version: 0.6.1
-" Last Change: 27 Apr 2010
+" Version: 0.7.2
+" Last Change: 14 Nov 2010
" Maintainer: Tamas Kovacs <kovisoft at gmail dot com>
" License: This file is placed in the public domain.
" No warranty, express or implied.
@@ -58,7 +58,10 @@ function! b:SlimvAutodetect()
endif
else
" Try to find Clojure in the home directory
- "TODO: add /usr/local/bin/clojure
+ let lisps = split( globpath( '/usr/local/bin/*clojure*', 'clojure*.jar' ), '\n' )
+ if len( lisps ) > 0
+ return b:SlimvBuildStartCmd( lisps )
+ endif
let lisps = split( globpath( '~/*clojure*', 'clojure*.jar' ), '\n' )
if len( lisps ) > 0
return b:SlimvBuildStartCmd( lisps )
@@ -113,5 +116,6 @@ function! b:SlimvHyperspecLookup( word, exact, all )
endfunction
" Source Slimv general part
+runtime ftplugin/**/lisp.vim
runtime ftplugin/**/slimv.vim
View
31 ftplugin/slimv.vim
@@ -1,6 +1,6 @@
" slimv.vim: The Superior Lisp Interaction Mode for VIM
-" Version: 0.7.1
-" Last Change: 31 Oct 2010
+" Version: 0.7.2
+" Last Change: 14 Nov 2010
" Maintainer: Tamas Kovacs <kovisoft at gmail dot com>
" License: This file is placed in the public domain.
" No warranty, express or implied.
@@ -420,6 +420,11 @@ function! SlimvRefreshReplBuffer()
return
endif
+ let repl_buf = bufnr( s:repl_name )
+ if repl_buf == -1
+ " REPL buffer not loaded
+ return
+ endif
let size = getfsize( s:repl_name )
if size == s:last_size
" REPL output file did not change since the last refresh
@@ -429,12 +434,6 @@ function! SlimvRefreshReplBuffer()
return
endif
let s:last_size = size
-
- let repl_buf = bufnr( s:repl_name )
- if repl_buf == -1
- " REPL buffer not loaded
- return
- endif
let this_buf = bufnr( "%" )
if repl_buf != this_buf
" Switch to the REPL buffer/window
@@ -456,8 +455,6 @@ function! SlimvRefreshReplBuffer()
let s:last_update = localtime()
try
- "execute "silent edit! " . s:repl_name
- "silent execute "view! " . s:repl_name
execute "silent view! " . s:repl_name
catch /.*/
" Oops, something went wrong, the buffer will not be refreshed this time
@@ -636,14 +633,14 @@ endfunction
" Select extended symbol under cursor and copy it to register 's'
function! SlimvSelectSymbolExt()
- let oldkw = &iskeyword
+ " Make sure to include special characters in 'iskeyword'
+ " in case they are accidentally removed
if SlimvGetFiletype() == 'clojure'
setlocal iskeyword+=~,#,&,\|,{,},!,?
else
setlocal iskeyword+=~,#,&,\|,{,},[,],!,?
endif
normal! viw"sy
- let &iskeyword = oldkw
endfunction
" Select bottom level form the cursor is inside and copy it to register 's'
@@ -748,7 +745,7 @@ function! SlimvSend( args, open_buffer )
if g:slimv_repl_split && repl_win == -1
execute "normal! \<C-w>p"
elseif repl_buf == -1
- buf #
+ execute "buf " . s:repl_name
endif
endif
endfunction
@@ -1020,6 +1017,12 @@ function! SlimvRefresh()
if bufnr( s:repl_name ) != bufnr( "%" )
" REPL is not the current window, activate it
call SlimvOpenReplBuffer()
+ else
+ try
+ execute "silent view! " . s:repl_name
+ catch /.*/
+ " Oops, something went wrong, the buffer will not be refreshed this time
+ endtry
endif
endfunction
@@ -1586,7 +1589,7 @@ elseif g:slimv_keybindings == 2
noremap <Leader>ds :call SlimvDescribeSymbol()<CR>
noremap <Leader>da :call SlimvApropos()<CR>
noremap <Leader>dh :call SlimvHyperspec()<CR>
- noremap <Leader>dt :call SlimvGenerateTags()<CR>
+ noremap <Leader>dg :call SlimvGenerateTags()<CR>
" REPL commands
noremap <Leader>rc :call SlimvConnectServer()<CR>
View
54 plugin/paredit.vim
@@ -1,7 +1,7 @@
" paredit.vim:
" Paredit mode for Slimv
-" Version: 0.7.1
-" Last Change: 07 Nov 2010
+" Version: 0.7.2
+" Last Change: 13 Nov 2010
" Maintainer: Tamas Kovacs <kovisoft at gmail dot com>
" License: This file is placed in the public domain.
" No warranty, express or implied.
@@ -71,6 +71,14 @@ let s:yank_pos = []
" Buffer specific initialization
function! PareditInitBuffer()
+ " Make sure to include special characters in 'iskeyword'
+ " in case they are accidentally removed
+ if &ft == 'clojure'
+ setlocal iskeyword+=~,#,&,\|,{,},!,?
+ else
+ setlocal iskeyword+=~,#,&,\|,{,},[,],!,?
+ endif
+
if g:paredit_mode
" Paredit mode is on: add buffer specific keybindings
inoremap <buffer> <expr> ( PareditInsertOpening('(',')')
@@ -113,8 +121,8 @@ function! PareditInitBuffer()
nnoremap <buffer> <silent> > :<C-U>call PareditMoveRight()<CR>
nnoremap <buffer> <silent> O :<C-U>call PareditSplit()<CR>
nnoremap <buffer> <silent> J :<C-U>call PareditJoin()<CR>
- nnoremap <buffer> <silent> W :<C-U>call PareditWrap()<CR>
- vnoremap <buffer> <silent> W :<C-U>call PareditWrapSelection()<CR>
+ nnoremap <buffer> <silent> W :<C-U>call PareditWrap('(',')')<CR>
+ vnoremap <buffer> <silent> W :<C-U>call PareditWrapSelection('(',')')<CR>
nnoremap <buffer> <silent> S :<C-U>call PareditSplice()<CR>
nnoremap <buffer> <silent> <Leader>< :<C-U>normal! <<CR>
nnoremap <buffer> <silent> <Leader>> :<C-U>normal! ><CR>
@@ -136,25 +144,25 @@ function! PareditInitBuffer()
endif
else
" Paredit mode is off: remove keybindings
- iunmap <buffer> (
- iunmap <buffer> )
- iunmap <buffer> [
- iunmap <buffer> ]
- iunmap <buffer> "
- iunmap <buffer> <BS>
- iunmap <buffer> <Del>
- unmap <buffer> (
- unmap <buffer> )
- unmap <buffer> x
- unmap <buffer> <Del>
- unmap <buffer> X
- unmap <buffer> s
- unmap <buffer> D
- unmap <buffer> C
- unmap <buffer> d
- unmap <buffer> c
- unmap <buffer> dd
- unmap <buffer> cc
+ silent! iunmap <buffer> (
+ silent! iunmap <buffer> )
+ silent! iunmap <buffer> [
+ silent! iunmap <buffer> ]
+ silent! iunmap <buffer> "
+ silent! iunmap <buffer> <BS>
+ silent! iunmap <buffer> <Del>
+ silent! unmap <buffer> (
+ silent! unmap <buffer> )
+ silent! unmap <buffer> x
+ silent! unmap <buffer> <Del>
+ silent! unmap <buffer> X
+ silent! unmap <buffer> s
+ silent! unmap <buffer> D
+ silent! unmap <buffer> C
+ silent! unmap <buffer> d
+ silent! unmap <buffer> c
+ silent! unmap <buffer> dd
+ silent! unmap <buffer> cc
endif
endfunction
Please sign in to comment.
Something went wrong with that request. Please try again.