Skip to content

Commit

Permalink
Updated plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
amix committed May 4, 2013
1 parent 687184f commit 630b462
Show file tree
Hide file tree
Showing 16 changed files with 287 additions and 147 deletions.
24 changes: 0 additions & 24 deletions sources_non_forked/bufexplorer/doc/tags

This file was deleted.

62 changes: 0 additions & 62 deletions sources_non_forked/taglist.vim/doc/tags

This file was deleted.

10 changes: 0 additions & 10 deletions sources_non_forked/vim-expand-region/doc/tags

This file was deleted.

17 changes: 11 additions & 6 deletions sources_non_forked/vim-less/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This vim bundle adds syntax highlighting, indenting and autocompletion for the dynamic stylesheet language [LESS](http://lesscss.org).

This bundle is compatible with [vim-css-color](https://github.com/skammer/vim-css-color),
[vim-css3-syntax](https://github.com/hail2u/vim-css3-syntax) and possibly other plugins that place code
This bundle is compatible with [vim-css-color](https://github.com/skammer/vim-css-color),
[vim-css3-syntax](https://github.com/hail2u/vim-css3-syntax) and possibly other plugins that place code
in `after/syntax/css.vim` or `after/syntax/css/*.vim`.

![vim-less with vim-css-color and vim-css3-syntax (colorscheme solarized)](https://github.com/lenniboy/vim-less/raw/master/screenshot.png)
Expand All @@ -21,21 +21,26 @@ in `after/syntax/css.vim` or `after/syntax/css/*.vim`.
$ cd ~/.vim/bundle
$ git clone https://github.com/groenewege/vim-less

- OR use [vundle](https://github.com/gmarik/vundle), adding this line to your `~/.vimrc`:

Bundle 'lunaru/vim-less'

- OR use git submodules:

$ git submodule add https://github.com/groenewege/vim-less.git bundle/vim-less
$ git submodule init

That's it. Pathogen should handle the rest. Opening a file with a `.less`
extension will load everything.

### Map
.less to .css , lessc is required.

nnoremap ,m :w <BAR> !lessc % > %:t:r.css<CR><space>

## Credits ##

Inspiration from [vim-haml](https://github.com/tpope/vim-haml),
Inspiration from [vim-haml](https://github.com/tpope/vim-haml),
[scss-syntax.vim](https://github.com/cakebaker/scss-syntax.vim) and
[vim-less](https://github.com/lunaru/vim-less)

## License ##

MIT : [groenewege.mit-license.org](http://groenewege.mit-license.org/)
8 changes: 8 additions & 0 deletions sources_non_forked/vim-multiple-cursors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.1 (04/26/2013)

Bugfixes:
- Fix 1 regression where cursors could potentially get out of sync in insert mode

Features:
- Added some logic to debug latency. Fanning out to 30 cursors in insert mode with my vimrc took over 300ms. It's like than 20ms with a plain vimrc. Need to debug what setting is causing the slowing down in insert mode and inform users.

## 2.0 (04/24/2013)

Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion sources_non_forked/vim-multiple-cursors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ highlight link multiple_cursors_visual Visual

## Issues
- Multi key commands like `ciw` do not work at the moment
- Insert mode can be slow. If you are using Neobundle and have many plugins, try switching to Vundle to see if it helps. See https://github.com/Shougo/neobundle.vim/issues/84 for additional info.
- All user input typed before Vim is able to fan out the last operation to all cursors is lost. This is a implementation decision to keep the input perfectly synced in all locations, at the cost of potentially losing user input.
- Performance in terminal vim degrades significantly with more cursors
- Select mode is not implemented

## Changelog
Expand Down
8 changes: 7 additions & 1 deletion sources_non_forked/vim-multiple-cursors/Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/multiple_cursors_spec.rb'
end

RSpec::Core::RakeTask.new(:benchmark) do |t|
t.pattern = 'spec/benchmark_spec.rb'
end

task :default => :spec
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ function! multiple_cursors#debug()
call s:cm.debug()
endfunction

function! multiple_cursors#get_latency_debug_file()
return s:latency_debug_file
endfunction

" Creates a new cursor. Different logic applies depending on the mode the user
" is in and the current state of the buffer.
" 1. In normal mode, a new cursor is created at the end of the word under Vim's
Expand Down Expand Up @@ -352,6 +356,7 @@ function! s:CursorManager.reset(restore_view) dict
let self.starting_index = -1
let self.saved_winview = []
let self.start_from_find = 0
let s:char = ''
call self.restore_user_settings()
endfunction

Expand Down Expand Up @@ -425,7 +430,7 @@ function! s:CursorManager.update_current() dict
" Sets the cursor at the right place
exec "normal! gv\<Esc>"
call cur.update_visual_selection(s:get_visual_region(s:pos('.')))
else
elseif s:from_mode ==# 'v' || s:from_mode ==# 'V'
call cur.remove_visual_selection()
endif
let vdelta = line('$') - s:saved_linecount
Expand Down Expand Up @@ -714,9 +719,6 @@ function! s:revert_mode(from, to)
call s:cm.reapply_visual_selection()
normal! V
endif
if a:to ==# 'i'
startinsert
endif
if a:to ==# 'n' && a:from ==# 'i'
stopinsert
endif
Expand Down Expand Up @@ -768,9 +770,9 @@ function! s:process_user_inut()
" FIXME(terryma): Undo always places the cursor at the beginning of the line.
" Figure out why.
if s:from_mode ==# 'i' || s:to_mode ==# 'i'
silent! undojoin | call feedkeys(s:char."\<Plug>(a)")
silent! undojoin | call s:feedkeys(s:char."\<Plug>(a)")
else
call feedkeys(s:char."\<Plug>(a)")
call s:feedkeys(s:char."\<Plug>(a)")
endif

" Even when s:char produces invalid input, this method is always called. The
Expand Down Expand Up @@ -809,9 +811,6 @@ function! s:apply_user_input_next(mode)
" Advance the cursor index
call s:cm.next()

" Update Vim's cursor
call cursor(s:cm.get_current().position)

" We're done if we're made the full round
if s:cm.loop_done()
if s:to_mode ==# 'v' || s:to_mode ==# 'V'
Expand Down Expand Up @@ -941,6 +940,37 @@ function! s:display_error()
let s:bad_input = 0
endfunction

let s:latency_debug_file = ''
function! s:start_latency_measure()
if g:multi_cursor_debug_latency
let s:start_time = reltime()
endif
endfunction

function! s:skip_latency_measure()
if g:multi_cursor_debug_latency
let s:skip_latency_measure = 1
endif
endfunction

function! s:end_latency_measure()
if g:multi_cursor_debug_latency && !empty(s:char)
if empty(s:latency_debug_file)
let s:latency_debug_file = tempname()
exec 'redir >> '.s:latency_debug_file
silent! echom "Starting latency debug at ".reltimestr(reltime())
redir END
endif

if !s:skip_latency_measure
exec 'redir >> '.s:latency_debug_file
silent! echom "Processing '".s:char."' took ".string(str2float(reltimestr(reltime(s:start_time)))*1000).' ms in '.s:cm.size().' cursors. mode = '.s:from_mode
redir END
endif
endif
let s:skip_latency_measure = 0
endfunction

function! s:wait_for_user_input(mode)
let s:from_mode = a:mode
if empty(a:mode)
Expand All @@ -958,8 +988,12 @@ function! s:wait_for_user_input(mode)
" Immediately revert the change to leave the user's buffer unchanged
call s:revert_highlight_fix()

call s:end_latency_measure()

let s:char = s:get_char()

call s:start_latency_measure()

" Clears any echoes we might've added
normal! :<Esc>

Expand All @@ -970,6 +1004,7 @@ function! s:wait_for_user_input(mode)
" If the key is a special key and we're in the right mode, handle it
if index(get(s:special_keys, s:from_mode, []), s:char) != -1
call s:handle_special_key(s:char, s:from_mode)
call s:skip_latency_measure()
else
call s:cm.start_loop()
call s:feedkeys("\<Plug>(i)")
Expand Down
21 changes: 0 additions & 21 deletions sources_non_forked/vim-multiple-cursors/doc/tags

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let s:settings = {
\ 'exit_from_visual_mode': 1,
\ 'exit_from_insert_mode': 1,
\ 'use_default_mapping': 1,
\ 'debug_latency': 0,
\ }

let s:settings_if_default = {
Expand Down
Loading

0 comments on commit 630b462

Please sign in to comment.