Comments (7)
Alternatively, allow for multiple grep commands in settings, and a toggle between them in the dialog window?
ag --literal
should still be the default in my opinion, because people might just think that atom-fuzzy-grep
is "broken" when it doesn't find anything. It doesn't report an error, unlike ag
on the command line.
from atom-fuzzy-grep.
@kankaristo, thanks for report. I will add error handling on described case. Regarding --literal
flag as default option actually I don't want to enable it by default because of regexp power. You can set any command/flag which useful for you on plugin settings page. Thanks.
from atom-fuzzy-grep.
What do you think about having the option to choose between different search commands?
I agree that it would be bad to lose the regex search altogether, but it would be nice to have a drop-down box with different search commands, so you could switch between them without having to go the settings.
This could be a string array in settings and a drop-down box in the search dialog.
from atom-fuzzy-grep.
I want to keep UI minimal and provide fast interaction with dialog without mouse or redundant key press.
You can add custom script to your ~/.atom/init.coffee
to switch between search command by set atom-fuzzzy-grep.grepCommandString
to any value you want via some key binding.
from atom-fuzzy-grep.
I didn't even think of that option. Thanks! :D
That suggestion could be added to README.md
, in case someone else wants multiple search commands.
I'll leave this ticket open for now, since atom-fuzzy-grep
should show an error when the search fails entirely (like with ag "Hierarchy("
).
from atom-fuzzy-grep.
@kankaristo, thanks!
from atom-fuzzy-grep.
In case someone else wants to have a key binding to change the grep command, here's what I did in init.coffee
:
atom.commands.add 'atom-workspace', 'fuzzy-grep:change-search-command', ->
currentCommand = atom.config.get('atom-fuzzy-grep.grepCommandString')
commands = [
'ag -S --nocolor --nogroup --column --literal',
'ag -S --nocolor --nogroup --column'
]
newCommand = commands[0]
for command, i in commands
if command is currentCommand and commands[i + 1]?
newCommand = commands[i + 1]
break
atom.config.set('atom-fuzzy-grep.grepCommandString', newCommand)
atom.notifications.addInfo(
"Changed fuzzy-grep search command",
{detail: newCommand}
)
Then just bind fuzzy-grep:change-search-command
to something.
from atom-fuzzy-grep.
Related Issues (20)
- Feature: Persist search pattern HOT 8
- Failed to spawn command `ag` on second window HOT 15
- debounce HOT 1
- Add support for pt The Platinum Searcher HOT 1
- Uncaught Error: spawn EACCES using AG in an Elixir Phoenix project HOT 2
- Allow grep-root specification HOT 1
- Settings not showing correctly. HOT 4
- Not working on windows HOT 4
- can't ignore multiple folders HOT 2
- search multiple words independent of order HOT 2
- Show document list sorted by date for 0 characters
- Results difficult to visually parse
- Cursor will not jump to search result using ripgrep HOT 3
- environment package VS process.env HOT 1
- Allow to search files HOT 1
- Question: public API HOT 2
- Search command line placeholders, to support CodeSearch
- version 0.17.0 totally doesn't work HOT 5
- search for ag, but in a git repo it should use git grep, right? HOT 3
- Maintainers Wanted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-fuzzy-grep.