mihaifm / bufstop Goto Github PK
View Code? Open in Web Editor NEWFast and efficient buffer switching for Vim
Fast and efficient buffer switching for Vim
in #7 you mention now colors are used, and colors come 'with colors from your colorscheme.'
I am not sure what colors are chosen, but in my case, although colors are diff for the buffer and the number, they are too similar, look:
It would help a lot if the numbers were yellow for instance (in my case). Is there any way to improve this?
thanks!
I've noticed that when I tried to delete opened/previewed file, bufstop take the entire window and because g:BufstopDismissKey
using :q
instead of :bd
, bufstop quit vim instead of closing bufstop window.
My suggestion is to make g:recent_bufstop_command
variable and delete the bufstop window, after that calling the bufstop command according to g:recent_bufstop_command
.
Here's an example if we use it on default Bufstop
command:
" wrapper for Bufstop(), default mode
function! BufstopSlow()
let g:recent_bufstop_command = 'Bufstop'
let s:fast_mode = 0
let s:preview_mode = 0
call Bufstop()
call s:UnmapPreviewKeys()
endfunction
---
" `bufwinnr` is to check if the buffer is open/visible
if bufwinnr(s:bufnr) ># 0
call remove(s:allbufs, line('.')-1)
exe "silent bd ".s:bufnr
setlocal modifiable
exe "d"
setlocal nomodifiable
bd
If g:recent_bufstop_command ==# 'Bufstop'
call BufstopSlow()
endif
else
call remove(s:allbufs, line('.')-1)
exe "silent bd ".s:bufnr
setlocal modifiable
exe "d"
setlocal nomodifiable
endif
and for the dismiss key, we can use:
exe "nnoremap <buffer> <silent> " . g:BufstopDismissKey . " :bd \| unlet g:recent_bufstop_command<cr><C-w>p"
I'm still not sure how to do that in BufstopPreview
tho. So, what do you think?
Nice plugin!
When I launch Vim I get the following error:
Error detected while processing function janus#load_pathogen..pathogen#helptags:
line 4:
E154: Duplicate tag "2" in file /home/gez/.vim/bundle/bufstop/doc/bufstop.txt
E154: Duplicate tag "3" in file /home/gez/.vim/bundle/bufstop/doc/bufstop.txt
This will enable doing the following outside Vim:
For instance, if filetype is html, it could be a keybinding that calls a function that opens the file in web browser. If the file type is a certain json, one could run a build with with the config it represents.
And it will enable doing things inside Vim:
Swapping buffer windows, rearranging window, etc Users can easily write such functions.
Why is this better than doing something like bufdo? Because user need not loose focus from the Bufstop window while executing all these niceties.
Hi,
When I use Bufstop
and then ESC
keys as a sequence, I can return back to the same window.
However, when I use Bufstop
and then Bufstop
keys as a sequence, buffer window is dismissed but it focuses on wrong window (left window of the window that I was working).
I think, this shouldn't happen because it become so cumbersome to use Bufstop
and ESC
together.
I have mapped Bufstop
to <shift-u>
and I want to use it as a toggle. It is really fast compare to using ESC
. I was using this feature in Buffergator plugin previously.
In summary, Bufstop
should be a toggle and do what Bufstop + ESC
does.
Looking forward to hearing from you.
Thanks.
Pressing arrow keys takes me out of the Bufstop window, and even worse it starts insert mode and inserts one of: A/B/C/D for respective: <Up><Down><Left><Right>. I have never encountered this with any other buffer/mode combination in my terminal. I like the rest of the UI.
You will need two simple things:
WebDevIconsGetFileTypeSymbol()
provided by it to get the file's icon (as discussed pointed here) & prepend it to the file name column of Bufstop/BufstopPreview window.The result will look something like this:
another improvement comes to mind very often. I use BufstopModeFast mode, and the order of the buffers shown in the commandline changes every time you change to a new buffer. The current buffer is put first, and the rest reflect any change needed to move the current one to first position.
It would be extremely useful not to change the sorting, this way:
Not sure how difficult would be to implement this, but it would be great.
Just came by to say I love this plugin. imo, two or one key switching to the most recently used buffer is the logical endpoint for those who feel:
So have some love ❤️ , this plugin is amazing, I think many would use it if only they knew about it.
Quick feature request, I think the Bufstop window is neat but kinda close to what a fuzzy finder can do. BufStopAutoSpeedToggle one key switching is great too but my F-keys are brightness, music, etc. besides they're far away. So I'm a big fan of <leader>2
/ <leader>3
. However, BufStopSpeedToggle is not an option like BufStopAutoSpeedToggle. Would it make sense to add one?
I'll typically open up a file, yank some lines (yy
), switch to another file (,2
), and then paste (p
). However, if I do it using :BufstopFast
, then the list of buffers is pasted instead.
After months of using bufstop, I'm mostly used to it, but if it could be fixed that would be amazing!
This plugin is great, I am moving from LustyJuggler to this one. But I think you could improve the status line visualization by taking a couple of features from Lusty:
thanks!
Right now I have the map
map ,b :CtrlPBuffer
by default this shows me the previous buffer already selected so I just have to press enter.
With your plugin, if I type
:BufstopFast
the selected buffer is still the current buffer.
With the suggested mapping I would need to type ,b2 but I am a lot more used to typing ,b, this makes a lot more sense to me.
Any chance of making the plugin behave this way? Thanks!
Thanks for this tiny plugin. Could we show indicators for modification, current file, and alternate file? Just like :ls
does.
Steps to reproduce:
Open Bufstop with :Bufstop
Press Down-key
Expected result:
Selecting next buffer (same as j key)
Actual result:
B is inserted into current buffer
When using :BufstopModeFast is less than two buffer present I cannot get out unless I type '1'.
I think it would be better if in this case just pressing a key would just do nothing as it does if '1' is pressed.
When the :Bufstop is repeated it should close (toggle), not build another window inside.
It would be a great UI enhancement for people used to arrow keys to directly open the document without having to press <CR> (perhaps even circle back from one end to another). Ideally usual j, k keys would just move the cursor up/down the list without actually opening the file. This will give users an option to quickly navigate to preview files with just one key stroke per file (all the while holding just one key), instead of pressing 2 key stroke per file j/k followed by <CR> or pressing different keys 1/2/3/4... (which doesn't scale with many buffers open).
Thanks!
Loving this plugin.
Here's something weird.
After setting BufstopAutoSpeedToggle
, <leader>1
doesn't seem to do anything. <leader>2
does what I expect it to.
Is this intended behavior? For now, I'm fixing it by setting g:BufstopSpeedKeys
to let g:BufstopSpeedKeys = ["0", "1", "2", "3", "4", "5"]
it would be great if the cursor jumped into the buffer when pressing Enter on a file
when showing up list of open buffers, it is sometime very handy to exclude extensions so you can show up more files...
or, if you want to really get fancy, you could allow using help:filename-modifiers syntax to customize how files are shows, as bufferline does with bufferline_fname_mod option.
thanks for this great plugin!
I'm seeing a strange interaction between bufstop and YouCompleteMe. When I split a window and then activate bufstop to select a different buffer, I'm left with one of the buffers and the buffer list instead of the two buffers I wanted. In other words, selecting a buffer when bufstop in a split window leaves the bufstop buffer selection buffer displayed. The only happens when I also have YouCompleteMe installed.
It seems more likely a YCM issue but I thought I'd ask here if anyone else has seen it.
I think it began recently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.