In all Visual Studio IDEs whenever you press Ctrl-F or Ctrl-H to open the search/replace edit box the IDE always places there the text under cursor. Is there way to make it to leave the present text intact instead? In all Delphis there is an option which I always uncheck: "Find text at cursor", but I couldn't find similar in MSVC.
Related
It used to be part of my Vim vocabulary... change to visual mode, place cursor to a search word, type * and all text between first and next search word would be highlighted. The highlighting can continue as long as you repeat pressing * and there is the next matching search word. Perfect set of commands to copy text, or simply as visual aid.
Coming back to Vim now after some time, this is not working on my configuration. What happens now is that only the letter under the cursor and all other such letters get highlighted.
I wonder if I have some conflict in my mappings or else? I use Vim v7.3. Anyone can help?
Vim does not have a visual mode command for *; this only works in normal mode. However, many people have a customization that supplies the super star visual variant, from Search for visually selected text - or a plugin like my SearchHighlighting plugin; its plugin page has links to many alternative plugins.
I guess you had something like that, too, but forgot about it. I also doubt that is was triggered by Ctrl + *; combinations of Ctrl and non-alphabetical letters mostly aren't available as unique mappings. The usual mapping is just *, overloading the original normal mode command for visual mode.
Vim 7.3 is from 2010 and very outdated. To become reacquainted with Vim (which I commend!), please choose a modern variant. It should be possible to install the latest version 8.1; if you can't find a proper package for your distribution (for Windows, check the binaries from either vim-win32-installer or tuxproject; on Linux, it's also not very difficult to compile it yourself (e.g. from the GitHub sources).
Issue is what the title says. Earlier I used to copy text from text files open in vim simply by selecting text and doing Ctrl + C. But now it puts me into visual mode, thus not allowing to copy the text. Its really annoying. Anybody knows any fix for this.
Thanks.
You probably have the mouse mode active. You can turn it off with:
:set mouse=
And turn it back on with
:set mouse=a
If you are using iTerm, you can leave mouse mode on all the time if you want, and hold Option when you want to select without using visual mode. I am not aware of a way to do that in OS X Terminal.
Update (from Younes in comments): For Terminal.app on El Capitan, press the Fn key to bypass the mouse mode. See this question for more.
I have been googling for a way to use vim bindings inside normal text fields in chrome. I've tried vmium and cVim but I can't figure out whether they have the functionality I'm looking for.
An example is this exact text area in which I'm typing my question. I'd like to be able to press Esc and go to vim command mode in here, and start deleting a line pressing dd.
Would that be possible? Or those plugins are just for navigation shortcuts?
Here's the answer!
Those plugins are for navigation only. If you want a Vi-like
experience in Chrome's textareas, try Wasavi. – #romainl
The cVim plugin allows for keyboard shortcuts to manipulate text inside text boxes. However, the shortcuts are not the same as vim and there are not as many. After installing the extension type ":help" to see the list of shortcuts.
I have a visual selection in vim spanning several lines and i want to "convert" that into a visual line selection. Preferably in a succint way if possible. Without just selecting the same lines again ofcourse, that doesn't seem like the vim way to do it.
I feel I could probably figure it out but I'm betting someone here knows a neat way to do it.
To switch from visual selection to visual line selection just press V (uppercase).
To switch back from visual line selection to visual selection, you can press v (lowercase) again.
Like Visual Studio when you type-in a tooltip shows you the summary (documentation) of lib/objects/functions etc.
Suppose, I'm experimenting with DataMapper. I would like to see what it has and what each of them can do (purpose) without leaving vim. Is this possible?
Although I'm doing PHP development, not Ruby, I think this will also work for Ruby:
For PHP (Drupal) I generate a tags file with ctags and configure vim to use this tagfile by setting the tags-option. (see :help tags).
Now when I start typing a function-name I can press CTRL-X CTRL-O to start Omnicompletion. Vim show a list of all possible completions and you can select next/previous suggestions with CTRL-N and CTRL-P. When selecting a completion Vim also shows the function declaration in a preview window.
You can close the preview window with the :pclose-command.
The preview will only show up if the completeopt-settings contains the preview value (see :help 'completeopt')