Coder Social home page Coder Social logo

betterfindbuffer's Introduction

BetterFindBuffer for SublimeText 3

Adds a couple of missing features to SublimeText Find Results buffer.

Note: You need to restart your SublimeText after installing this plugin.

Features

  • Open the the file and line under the cursor by pressing Enter or o
  • n and p to jump to next/previous file
  • j and k to jump to next/previous match
  • Open multiple files with multiple cursor at the same time by selecting lines and pressing Enter or o
  • Open all files in the result with a
  • Fold a result with f and move to next file
  • Show shortcuts with ?
  • Remove path prefix in filenames based on open sublime's project folders (can be disabled in settings)
  • Set find results as readonly (can be disabled in settings)
  • Adds search keyword and file names to the symbols list (use Super+R)
  • Cleaner UI (hides line numbers, gutter, indent guides)
  • Better Syntax highlighting for find results
  • Custom color scheme

BetterFindBuffer Screenshot1

BetterFindBuffer Screenshot2

Installation

You can install via Sublime Package Control Or you can clone this repo into your Sublime Text Packages folder.

Changing color scheme

If you don't like colors used in the find results buffer just copy this file to your User folder, change colors and save it and then create a file called Find Results.sublime-settings in your User folder and paste the code below:

{
  "color_scheme": "Path to your custom color scheme file. e.g. Packages/User/Custom_FindResults.hidden-tmTheme",
}

Alternatively, you can use BetterFindBuffer-Designer tool as GUI to easily customize the Find-Results color scheme.

Credit

FindInFilesOpenFileCommand is inspired by this answer on StackOverflow

License

See the LICENSE file

betterfindbuffer's People

Contributors

aziz avatar corbanmailloux avatar kl0tl avatar mreq avatar praetorian20 avatar rahul-ramadas avatar ronnix avatar vovkkk 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

betterfindbuffer's Issues

Plugin load error in ST3 on Windows

After installing through Package Control and restarting ST3, I consistently get a plugin load error reported.

ST3 build 3059
Windows 7 Enterprise 64-bit

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 157, in on_api_ready
    m.plugin_loaded()
  File "find_results in C:\Users\tillig\AppData\Roaming\Sublime Text 3\Installed Packages\BetterFindBuffer.sublime-package", line 86, in plugin_loaded
  File "X/shutil.py", line 221, in copy
  File "X/shutil.py", line 109, in copyfile
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\tillig\\AppData\\Roaming\\Sublime Text 3\\Packages\\BetterFindBuffer\\Find Results.hidden-tmLanguage'

Pressing N and P multiple times to jump

Awesome plugin. I only have one minor niggle:

It seems I often have to press n or p more than once to jump back and forth. This seems to be the case more often when showing massively compressed/minified files.

Filter setting

It would be great to be able to filtered out certain results, e.g. generated *.min CSS files would be awesome to hide!

Suggestion: Allow opening result files in adjacent pane

Love the package. It makes find much more useful. The only improvement I can think of is that when using multiple panes in a layout it would be very nice to have the files open in an adjacent pane instead of replacing the current view. Any chance this could be made an option for the package?

[SUGGESTION] Add a fold all option

Hello, i'm a big fan of this plugin ๐Ÿ‘

Would love to have a fold all command, or a fold all when x number of results, or auto folding for big chunks of minified files. That would really take this plugin up a notch.

ps: I think vscode does it, that's where I stole the idea ๐Ÿ‘

Custom Color Scheme

Can't get custom colour theme to load in OSX with ST3 despite following instructions and multiple ST3 restarts

Can't get the custom colors to apply?

I've tried using the suggestions to create a custom colour scheme, but I can't get it to apply. I've pointed my settings at it, and I can break the themeing (by making it bad xml), confirming that it's loading the file I think it is. But any changes that I'm making aren't being reflected in the results pane?

Edit text in buffer.

What do you think about opportunity - save changes to file after editing in buffer?
I found only one plugin with this feature: https://github.com/titoBouzout/FindResultsApplyChanges
As I understand - it scans all files and store text for each, when you edit smth - it check saved data and new scan from buffer, rewrite data to files.

p.s. Does it real, to embed syntax of files, which are shown?
I remember that syntax scheme may contain other:
http://docs.sublimetext.info/en/latest/reference/syntaxdefs.html , search include here.

Can not find "Find Results.hidden-tmLanguage" if installed via Package Control

reloading plugin BetterFindBuffer.find_results
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3 Portable Beta\sublime_plugin.py", line 115, in reload_plugin
    m.plugin_loaded()
  File "find_results in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\BetterFindBuffer.sublime-package", line 86, in plugin_loaded
  File "./shutil.py", line 227, in copy
  File "./shutil.py", line 109, in copyfile
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Sublime Text 3 Portable Beta\\Data\\Packages\\BetterFindBuffer\\Find Results.hidden-tmLanguage'
generating meta info summary

Package Control downloads packages as sublime-package archives, as you probably know. Thus you need to use sublime.binary_resource() and then write that into the target destination.

Btw, why would I need to restart ST in order to complete installation? I can't find any critical code.

Dark Color Scheme Variant

I like the highlighting of the custom color scheme, but the bright color scheme conflicts with my theme and default color scheme.

Please add a dark variant that we can specify in our Packages/User/FindResults.sublime-settings file. (This should be mentioned in the default settings file inside a comment.

inherit colours from theme

rather than having to manually specify colour codes in a settings file, is it possible to inherit the current theme's colours?

BetterFindBuffers stalls ST3 on first usage

After switching to ST3, I notice that - upon executing the first find in files action - BetterFindBuffer stalls ST3 for 5 to 10 seconds, using 100% of the CPU. AFAIK subsequent usages do not do this. Any clue what is going on?

Searching in a file opened from BetterFindBuffer breaks n/p/j/k back to the find buffer

In a search for "foo" using BetterFindBuffer,

  1. Use n/p/j/k to navigate results, and open a result
  2. In the result, make a search on anything. For example, Ctrl+F, type "bar", hit enter
  3. Close the result tab, bringing you back to BetterFindBuffer
  4. Hit j

Expected: next result for "foo" is selected.

Actual: nothing happens. Looks like BetterFindBuffer lost its context, and searches for "bar" instead of "foo".

Focus the Find Results panel

First of all, I just installed this plugin and already love it!

My suggestion is to add a shortcut key for focusing the Find Results panel. I've installed FindResultsBufferUtils so that I can jump back to the buffer with ctrl-k+ctrl-f, but it would be good to have this feature by default.

Failing to Load custom colors under Windows

either specifying direct path or relative or even putting the file in the root drive leads to an error, e.g.
"color_scheme": "FindResults.hidden-tmTheme"
"color_scheme": "Packages\\User\\FindResults.hidden-tmTheme"
"color_scheme": "C:\\FindResults.hidden-tmTheme"
"color_scheme": "C:\\Users\\Administrator\\AppData\\Roaming\\Sublime Text 3\\Packages\\User\\FindResults.hidden-tmTheme"

the error:
Error loading colour scheme Packages\User\FindResults.hidden-tmTheme: Unable to open Packages\User\FindResults.hidden-tmTheme

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.