Git Product home page Git Product logo

bufstop's People

Contributors

bentomas avatar bruhtus avatar mihaifm avatar rburkat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bufstop's Issues

colors in statusline

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:
2014-05-14 12_32_22-todo txt c__users_jm_dropbox_solrlan_kirentech1204_apache-solr_putil - gvim

It would help a lot if the numbers were yellow for instance (in my case). Is there any way to improve this?

thanks!

Add `g:recent_bufstop_command` variable to enable delete the current opened file

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?

Helptags issue

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

Add getter functions that returns info table for all lines or current line selected in Bufstop/BufstopPreview window

  1. getter function that returns information table for current line selected in Bufstop/BufstopPreview window: This will enable so many things inside and outside vim, that sky is the limit! The return value will be a key:value table that has keys like filename, full path, buffer number. This can inturn be used by user to their liking to apply their own custom key bindings to do things they want to with this information.

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.

  1. getter function that returns an array of tables for all lines in Bufstop/BufstopPreview window, with a way to access the position of current line. This will enable batch processing, and users can write useful functions to iterate over the buffers in the list and do tasks to their liking.

Why is this better than doing something like bufdo? Because user need not loose focus from the Bufstop window while executing all these niceties.

Toggling buffer window with Bufstop command

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.

Enable devicons, add filetype "bufstop" to Bufstop window for users to be able to detect it and color it if they like

You will need two simple things:

  1. Check if vim-devicons plugin is loaded. If yes, then use the function 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.
  2. Make sure to assign a unique filetype name like "bufstop" to your Bufstop window. This can be used by people who want to color the icons (you don't need to add any coloring code yourself). This is being discussed here.

The result will look something like this:

https://github.com/ryanoasis/vim-devicons#---1

keep order of buffers

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:

  • buffers would be in the same position so it's faster to find them when you have many
  • the always keep the same letter, so it is also faster

Not sure how difficult would be to implement this, but it would be great.

This is _the_ missing plugin

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:

  • jumplist can take n jumps to get back to the m most recently used file
  • fuzzy finding files or buffers is too slow and doesn't muscle memory
  • alternate file is useless if you need to go two or three files further back although I will admit that's 90% of my use
  • something like harpoon is too much setup for you as your set of active files changes too quickly

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?

bufstop puts list of buffers in default register

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!

More functional Statusline feature request

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:

  • their status line is clearer (colors and the | to separate buffers make a difference)
  • you could allow using home row keys (asdf jkl...) instead of 1234..to select the buffer, this provides and even faster switch.

thanks!

Make selected buffer previous one visited

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!

Support for arrow keys

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

Enhancement: Enable Up/Down arrow keys to open the document without having to hitting enter

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!

After setting `g:BufstopSpeedKeys`, <leader>1 doesn't do anything

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"]

wish: option to customize filenames

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!

Interaction with YouCompleteMe?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.