how to autocomplete file name like this in zsh - autocomplete

I have a file: Oasis - Sitting Here In Silence.mp3
I wanna type "here<tab>" then autocomplete
like file search
how to do that?
thanks a lot

What you are looking for is Zsh Tab completion but you have to surround "here" with asterisks
> *here* <then press Tab>
Here is an excellent article on how to search, use tab completion, and wildcards.
Getting started with Zsh

Related

VSCode Vim extension to search for visual mode selected text

In vim I can search for a visually selected string using a number of techniques including what can be found here:
http://vim.wikia.com/wiki/Search_for_visually_selected_text
Is there a way to do the same thing in VSCode with the Vim extension?
Right now, VsCodeVim doesn't support the command in search mode, so that keybinding isn't possible.
If you want to see that in the future, opening an issue at https://github.com/VSCodeVim/Vim/issues would help.
EDIT: https://github.com/bronson/vim-visual-star-search is implemented, so this functionality is now there.

Does Rubymine have the feature code snippet and all auto-complete

I'm used to the sublime text 3 editor.
It has many handy features.
take the code snippets for example,
Once you type begin then press TAB
It will generate the corresponding code block
begin
rescue Exception => e
end
And the plugin All Autocomplete
It can show the auto-complete hint for all opened files.
For example, if you have a variable name called taiwan_is_awesome
then you can get the autocomplete in other files.
Does Rubymine has the above features ?
If yes, what's the corresponding keymap ?
It's important for me to use those features.
THanks
Once you type begin then press TAB
It's called "Live Templates".
"Live templates (or code snippets) allow you to insert frequently-used constructions into your code. These can be conditions, blocks, loops, and so on."
You can manage bundled and create new ones at Settings/Preferences | Editor | Live Templates.
Here is a good "how to use" tutorial with screenshots: https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm -- it's for PhpStorm but exactly the same functionality is available in RubyMine.
UPDATE: 2022-11-15
The above tutorial link now automatically redirects to the corresponding Help page for PhpStorm.
Here is the same official Help page but for RubyMine that shows how to use and create them: https://www.jetbrains.com/help/ruby/using-live-templates.html
The setting you want to make RubyMine code completion work like All Autocomplete in Atom & ST3 is called "Autopopup code completion".
Solution:
Settings > Editor > General > Code Completion > "Autopopup code completion"
Note: there is another type of code completion called "Hippie Completion".
However, it works differently than "All Autocomplete". In RubyMine "Hippy Completion", you start typing text, and then you have to "guess" when RubyMine has enough text to figure out the completion you want. Then you hit ⌥/ (on the Mac). If RubyMine guesses right, it will autocomplete correctly.
I greatly prefer the "All autocomplete"/"Autopopup code completion" method, but just thought I'd mention this alternative.

How do I see the current encoding of a file in Sublime Text?

How do I see the current encoding of a file in Sublime Text?
This seems like a pretty simple thing to do but searching has not yielded much. Any pointers would be appreciated!
Since this thread is a popular result in google search, here is the way to do it for sublime text 3 build 3059+:
in user preferences, add the line:
"show_encoding": true
Another option in case you don't wanna use a plugin:
Ctrl+`
or
View -> Show Console
type on the console the following command:
view.encoding()
In case you want to something more intrusive, there's a option to create an shortcut that executes the following command:
sublime.message_dialog(view.encoding())
With the EncodingHelper plugin you can view the encoding of the file on the status bar. Also you can convert the encoding of the file and extended another functionalities.
For my part, and without any plug-in, simply saving the file either from the File menu or with keyboards shortcuts
CTRL + S (Windows, Linux) or CMD + S (Mac OS)
briefly displays the current encoding - between parentheses - in the status bar, at the bottom of the editor's window. This suggestion works in Sublime Text 2 and 3.
Note that the displayed encoding to the right in the status bar of Sublime Text 3, may display the wrong encoding of the file if you have attempted to save the file with an encoding that can't represent all the characters in your file.
In this case you would have seen an informational dialog and Sublime telling you it's falling back to UTF-8. This may not be the case, so be careful.
ShowEncoding is another simple plugin that shows you the encoding in the status bar. That's all it does, to convert between encodings use the built-in "Save with Encoding" and "Reopen with Encoding" commands.
plugin ConverToUTF8 also has the functionality.

Eclipse highlighting the same occurrence of the word

In Notepad++, it has a very nice feature that if I select a word, it will highlight all the same words throughout the text. I can also set the hot-keys to highlight up to five different words with different styles (See the effect below) .
Is there any ways to get this similar effect in eclipse? I know when editing Java, it will highlight all the same variables, but it will not work when I highlight the comments and editing other files type (e.g. xml, html, js, css and etc).
I've been working with Eclipse for quite a while and I'm pretty certain that there is no canonical way of doing this.
In Eclipse these things are managed on a per-editor basis and the Java editor does not support what your looking for for all I know. At least for the Java editor you can do some minor configuration in what is highlighted and how (Preferences > Java > Editor > Mark Occurrences), but I guess you already know that.
As for plugins, I'm not aware of any plugin that achieves what you're looking for. As a matter of fact I'd be surprised if there really was a plugin which achieves what you're looking for.
If something comes up I'd much appreciate you sharing it here, I've been trying to get decent highlighting into Eclipse for years unsuccessfully... :)
Here is a plugin for eclipse: http://ystrot.github.io/glance/
It highlights all occurrences as with notepad++ upon hitting Ctrl + Alt + F.
Below is what I found works for me but you can also assign a key shortcut to 'Find Text in File':
Select the word or section of text
Press CTR+3 to activate 'Quick Access' search
Type 'Find Text in File'
Execute
As mentioned by #Kislingk you can modify how the words are highlighted/marked in 'Preferences > General >Editors>Text Editors > Annotations'.
Here is the closest solution I have found:
Create a shortcut in Preferences/General/Keys
type in the search field: "Find Text in File"
By default it has nothing assigned so just assign your key binding to it.
Annotations can help with displaying it in the sidebar
If you enable "Mark Occurrences" (Alt + Shift + O), then all words that are the same as the one you have marked will be highlighted.
Well if you're searching in the currently open file only (via CTRL-F) then no, you can't have everything highlighted.
However if you use the advanced search (CTRL-H, then go to "File search" tab) there you can input the search pattern, as well as the file-name pattern for the file(s) where it should search, and when the search is done, the search terms are highlighted in each file where they were found:
Use file search to search selected resource can highlight same word in single file.
Another useful eclipse plugin is eclipse instasearch. It has extensive feature set. This is also available in eclipse marketplace.
There are other options needed to enable.(Preferences > General >Editors>Text Editors > Annotations). Find Occurrences and WriteOccurrences and enable Text as 'Hightlight'
Have tried all of the above answer, but all not working. At the end, i found that it's due to i have accidentally remove some of the JRE System Library, after add back, it's work correctly
Window > Preferences > Java > Editor > Mark Occurrences

How to enable completiion in Coda like Textmate & Notepad++?

Textmate & Notepad++ can complete all words which appeared in the current document, how to enable this in Coda?
e.d. I have typed "some_text" in a document, then when I type "some_" then press ESC - "some_text" should appear in the suggestions list.
Auto-complete in Coda is automatically enabled, and as far as I know, it can't be disabled. It is a lot like Dreamweaver with auto-complete, it will show you your starting tags and should automatically close some tags.
As for words, I'm pretty sure that it doesn't do that.