Search-Everywhere in Android Studio (IntelliJ) makes Search File redundant? - android-studio

In Android Studio (and IntelliJ), shift-shift is used to Search File (and Everywhere, e.g. class name etc).
I just realize it also have shift-command-O that search for a file.
With shift-shift, it seems to me shift-command-O is redundant.
So I'm checking to see if I have miss something that is in shift-command-O but not in shift-shift?

Shift-Shift shows a popup with occurrences of the string you've entered in names of files, classes, symbols and actions. Shift-Command-O shows a popup with occurrences of the same string only in names of files. Same task, same UI (in recent IJ/AS versions) more narrow filter.

Well you're almost right but there is one main difference in those two commands.
Shift shift will search for a file.
While shift-command-o will go to the specified file.
I guess in a way they to de same, but if you use Shift-command-o you will be redirected to that file and saves you one click.
But feel free to use what you want, shortcuts are for convenience so you should use what is most comfortable.
Here is a link with all shortcuts in IntelliJ IDEA, could be usefull in the future :)
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf

Related

How to enable code folding features on plaintext files on JetBrains IDE?

It seems as if the brackets are recognized based on location and even highlighted, but I'm not allowed to fold those areas. This seems like such a simple thing to do since it could reuse code from other parts of the editor and is half-implemented already. I think it might exist in some form, even as a plugin.

VSCode Vim multiple cursors

I have looked everywhere and I am still unable to switch off this 'feature'!
I've been using vi and, later, vim, since the 80's and I have never had need of multiple cursors, nor can I see a use for them.
:<range>s/search/replace/ does everything I need so this new feature is infuriating beyond words, especially as I've no idea how to switch it off when it seemingly-randomly appears.
Would someone be wonderful enough as to tell me how to banish, remove, consign-to-history the multiple cursors feature in VSCode Vim 1.12.4, please?
I believe this issue is specific to the plugin. I experienced it with the HTML plugin recently, and I'm assuming you have the same problem with HTML files, but the same principle should apply to other plugins as well. You just have to find the setting.
In the VS Code settings, there is an option that reads:
HTML: Mirror Cursor On Matching Tag
You can uncheck the box there to disable the feature. Or you can go to the settings.json in your local repo (inside the .vscode directory), or the equivalent global file, and add/modify the following field like so:
"html.mirrorCursorOnMatchingTag": false
That should take care of it for you.

In Android Studio, how do I change the Kotlin naming conventions?

Android Studio just updated its Kotlin plugin, and suddenly my code is polluted with warnings about the naming conventions. Apparently Google and/or JetBrains think everyone ought to use CamelCase, but (a) I prefer snake_case (use of underscores), (b) nearly every line of my sources now has a lint complaint, making it hard to separate the wheat from the chaff, and (c) I don't have time to rewrite all my code just to pander to other people's aesthetic sense.
How do I convince AS to be a Philistine like me?
In the menu, select File, then Settings. In the leftmost panel of the window that now appears, select Editor, then Inspections. In the next leftmost panel that now appears, find Kotlin, unfold it by clicking on the triangle, then find Naming conventions, and unfold that. You now have two options.
If you want AS to disregard Kotlin naming conventions, you can simply uncheck its box, and the boxes below it.
However, you can actually use this to convince AS to convert to snake_case instead of CamelCase, or any other aesthetic, as opposed to Google's and/or JetBrains'. If you click on, for instance, "Class naming convention," you will see on the right a text box labeled "Pattern:". It will probably contain [A-Z][A-Za-z\d]*. Add an underscore in a strategic location according to regex rules, for instance, [A-Z][_A-Za-z\d]*. Do this for each of the identifier types whose naming convention you'd like to change, and you're good to go.

Search between 2 files in Visual Studio 2017

So I have recently switched from VS2010 (which just kept crashing at least every day) to VS Community 2017, and one of the things I used to do basically all the time, which is to select the name of a function/variable in one file, ctrl+F it then switch to a different file and search for it there, I just can't do anymore because of that stupid quicksearch bar.
However, the reflex to do that is so deeply ingrained by now, that I often end up opening the quick search in one file anyway, then switching file, then facepalming with a grunt as I go back to the previous file, ctrl+c, then back, then ctrl+f, ctrl+v, then enter. You can see how that can get frustrating with 20+ occurences a day. (yes, I swap-search through files a lot. It's how the projects I work on are designed, and it really worked just fine before they prevented me from doing that one very important little task quickly. Ugh!)
I have searched all around for a solution to this, but the common "Fix" is to map ctrl+F to the "search all files". It doesn't do what I need to do. If I switch the "search in" option back to "current document" (I know which file I'm looking into! I don't want to look through ALLL open files, or the entire project, just that one other file that's not the one I have open right this second), IT GOES BACK TO THE QUICK SEARCH BAR!!!
I can't be the only one with that search-switch file-find workflow. Is there an extension I missed that would fix this? Some kind of hacky registry modification that would give me back my good ol' search dialog without that annoying quick search? (Seriously, I had the power tools or whatever extension that had this in VS 2010, and had turned it off literally after the first time I used it cuz I hated it). Or! Hey, maybe something that'll at least keep that little box open/preserve the search value between files.
The time I spend having to go back and copy instead of right up search is making the switch to vs2017 almost irellevant vs the once a day crashing of vs 2010.
Thanks guys!

VIM as an IDE - Suggestions

I am looking for recommendations on using VIM as an IDE. I generally code in a number of programming languages, including C, C++, assembler, MATLAB, Maple, BASH scripts, to name a few.
In general, I like to use a single IDE for the bulk of my projects for the sake of consistency, and I have found that I perform about 90% of all my coding in VIM, and occasionally use Eclipse instead for certain projects in C/C++ (ie: projects people have already put together as an Eclipse project, or PIC24/32 projects from www.microchip.com).
I am already very familiar with the basic functionality of VIM (windows vs buffers, text manipulation, scripting), and would like to use it as my primary IDE. I have already taken a few tips from here:
http://vim.wikia.com/wiki/Use_Vim_like_an_IDE#Writing_Code
I already use the nerdTree plugin for directory browsing in a project, etc, but I need to do something about code completion and symbol resolution, as those are my two greatest concerns.
Symbol resolution
I have some limited experience in the use of C-tags, and wanted a suggestion on what I should use if I am working with a VERY large code-base that changes frequently. The projects I work on typically are pulling in header files from at least a dozen other projects, and I would like to be able to jump to the file where a function, constant, or macro is defined quickly (ie: like the CTRL-G feature in Eclipse, "jump to definition"), as well as rapidly get a list of all calls/references to a function/macro/constant/etc (ie: like the CTRL-SHIFT-G feature in Eclipse, "Show all references in project or current working directory").
Tab completion
One of the features I really like in Visual Studio and Eclipse, for example, is when I type in a variable name (ie: pointer to struct) and it resolves the names and types of all structure members and gives me a tab completion list to choose the appropriate member. They also point out when I've incorrectly used "." vs "->" for member access. I've tried superTab in VIM, but I just couldn't get it working. I also want the tab-completion feature to use the same C-tags as generated by the symbol resolution plugin
Handling build output
The final concern of mine is having an auto-generated list of build warnings and build errors. When I, for example, just run "make all" at the command-line prompt, it is a pain to have to read through code listings to manually find all build warnings.
I realize this is a lot to ask, and that I could always just fall-back to Visual Studio or Eclipse, but I really want just a simple cross-platform console-capable modal editor for all my development needs, and none of the major IDE's out there fill this need.
Thank you all in advance.
http://eclim.org/ - bring Eclipse functionality to the Vim editor
https://github.com/scrooloose/syntastic - syntax checker warnings in quickfix list
I think (but haven't checked) that Eclim satisfies #1 and #2 while I'm sure that Syntastic satisfies #3. More things of interest:
https://github.com/Lokaltog/vim-powerline - just nice
https://github.com/kien/ctrlp.vim - quick file finder
https://github.com/tpope/vim-pathogen - plugin manager (to install the others)
And are you aware of omnicompletion via Ctrl-p and Ctrl-n (prev and next) in insert mode? That's not code completion, but frequently does the job.
For the auto-completion part (point 2), I am proficiently using clang_complete.
For a quick setup and reference, try this page: http://zwiener.org/vimautocomplete.html
EDIT: this is for C, C++ and Objective-C only.
I use the following configuration in vim:
zipped file
It has autocomplete based on tag list, ctags, nerd commenter and some more plugins.
Hope it helps.. :)
I have been using Vim as an IDE for about a year now. All of my customization is online at github.
That said, I don't think a Vim beginner should start using vim like this; rather I think the Vim beginner should learn vim incrementally. The only changes that I think are so essential I would make them from the very beginning are:
Remap ESC to jk
Switch : and ;
Set leader key to ,

Resources