Inverse search using firefox - firefox

I am writing a document using restructured text format in Turkish. I constantly review the output by using Firefox. As there is no spell checker in vim, I try to track down the spelling mistake by reading several times over Firefox and then try to correct the spelling mistake in source document (vim.) I wonder it is possible to make an inverse search so that whenever I come across a mistake in Firefox, clicking on it will bring me to corresponding word in vim.
thanks,

There is a spell checker in Vim.
Read :help spell, specifically the part on using custom spell files, :help spell-mkspell.

Related

How can I turn off the autocompletion when writing applescript in automator?

It's very annoying for me that when I write the script, 3 dots appear and I can't continue to write my code because it jumps here and there.... does anyone know a solution for this? I would like to remove auto-completion from the code
I tried with the settings and keyboard commands, but unfortunately it didn't work!
Maybe using script editor is a better way. It‘s a built-in app, also supports syntax highlight and code running.

Gimp/Mac: Text tool interprets keystrokes as commands

I wonder if you can help me with this rather bizarre phenomenon.
I'm using Gimp 2.8.3 on a Mac OS 10.9.5 and I try to insert text with the Text Tool. Easy enough, but when I type e.g. "Jazz", I get as far as "J", and then the "a" is interpreted as command and the airbrush tool gets activated. This happens with every (lowercase) key which in principle has a command function.
I checked the manual but there's no mention of something that needs to be switched off to use the text entry tool.
Anybody seen this before?
Thanks, Rob
Update: I've had the brilliant idea to check for Gimp updates. Turned out, there's a Gimp 2.8.14 now, which doesn't show this behaviour anymore. So, it seems to have been a bug in Gimp which luckily has been fixed.
Just for the record: if anyone is hit by this or a similar bug, there is a workaround if upgrading/fix is not an option: gimp 2.8, the old off-image text editor for creating text can be used, by checking the Use editor control in the text tool options.
GIMP will them pop a small blank window where the text can be typed without being intercepted by other parts of the application.

How to create a md file under windows

I am using git bash under windows because I am having some troubles with Linux right now. I have to make a commit but I have no clue how to create a file with extension .md under the windows platform.
could you please tell me?
Thanks
You doing the Coursera data science course as well? :)
Syntax is:
touch filename.md
Good page I have bookmarked:
http://www.typecastexception.com/post/2012/09/08/Basic-Git-Command-Line-Reference-for-Windows-Users.aspx
An .md (short for MarkDown) is just a text file with some fancy formatting options, like making text between two sets of ** bold (GitHub, e.g., has a pretty comprehensive guide).
You can use any text editor, even Notepad, to create such a file.

Intellisense in notepad++

It is possible configure notepad++ to the Intellisense show options about firefox os api?
e.g. To can see all methods
var battery = navigation.battery;
battery.level;
I don't know if this is exactly what you're looking for, but Notepad++ (current releases) have a form of this known as AutoComplete - go to Settings > Preferences > Auto-completion and tick the enable auto-completion for each input* button.
As for the Firefox OS API specifically, I don't know if that works. But I know you can achieve the intellisense effect with languages themselves, anyway.
Keep in mind the differences between "Function Completion" and "Word completion" inside auto-complete: Function Completion uses external cues to tell you exactly what you're trying to write in, as it autocompletes functions from an API.
Word completion meanwhile may be more helpful in your case; If Firefox OS API can't be worked into NPP, you can at least auto-complete functions that you've already written into your script, as Word completion scans your document and suggests words that already exist; It's sort of useful as a text expansion engine.
I hope I've been of help; Best of luck to you.

Is there a Firefox add-on to use vim to edit textboxes?

or "How do I answer questions on SO in Firefox using gVim inside the textboxes?"
It's All Text!
From the extension page:
At the bottom right corner of any edit
box, a little edit button will appear.
Click it. If this is the first time
you've used "It's All Text!" then you
will be asked to set your preferences,
most importantly the editor.
The web page will pop up in your
selected editor. When you save it,
it'll refresh in the web page. Wait
for the magic yellow glow that means
that the radiation has taken effect!
Vimperator makes Firefox act very much like VIM:
Vimperator is a free browser add-on for Firefox, which makes it look and behave like the Vim text editor. It has similar key bindings, and you could call it a modal web browser, as key bindings differ according to which mode you are in.
Once you have the cursor in a text box, hit Ctrl-I to open in your editor, which defaults to gvim.
The current answers don't work anymore now that Mozilla removed XUL in favour of WebExtensions. With recent firefox versions, there are the following options (sorted in descending order by the current popularity on addons.mozilla.org).
GhostText provides instant synchronization between editor and textbox via editor-specific plugins. The project is on github and the vim extension is written in Tcl.
withExEditor is cross-platform but requires a native application written in node.js. In addition to editing text fields it also allows viewing the source of the page, MathML, SVG and the current selection. The project on github and the native node.js application
Textern requires a (currently) Linux-only native application written in Python. Synchronizes the content of the text field while you type in the editor. The extension and the native app can be found on github
Tridactyl is probably what you're looking for nowadays.
It's the spiritual successor to the likes of Pentadactyl and Vimperator, which are not available for the current version of Firefox.
If you want something more like It's All Text, where the editing area appears right on top of the browser text area rather than launching an editor window, and you're willing to use Neovim, check out firenvim.
It's All Text! will let you use whatever editor you want. To use vim with it, you'll need a small shell script to open it in a terminal:
#!/bin/sh
exec xterm -e /usr/bin/vim "$#"
If you have GVim, you won't need the shell, script, obviously.
ViewSourceWith is another addon worth lookng at. It supports more than just edit boxes and text. For example, you can configure it to open images in the GIMP.
Another feature that I find useful is that it can pop-up a dialog box that shows all the js and css scripts used on the page. You can then choose to view/edit file in your preferred editor.
For answering questions on SO, you may also want to get the Vim Markdown Syntax file
The "It's all Text" extension, perhaps?
http://addons.mozilla.org/en-US/firefox/addon/4125
If you use vimperator and have the markdown syntax file installed, a useful line for your .vimperatorrc is:
au LocationChange .* :set editor="gvim -f"
au LocationChange stackoverflow\.com :set editor="gvim -f -c 'set ft=mkd'"
This will tell vim to do syntax highlighting for markdown when you are on stackoverflow.com, but not when you are any other site. There are similar hacks for wikipedia/mediawiki etc. Enjoy :)
One way to do this is to use the vimperator extension - of course, that does a lot more than what you're looking for.
At the time of writing it is experimental, but the jV extension looks good. To quote from the page:
This extension makes all html textareas into a very stripped-down version of Vi[m]. It's modal, supports infinite undo, has register support, search, visual mode, and various movement and editing commands.
When using Vimperator in Windows (I am using Vista) you may need to double-escape the path to gvim.exe to use it as the external editor. Single escaping did not work for me as Vimperator unescapes it twice. Eg:
:set editor="C:\\\\Program\\ Files\\ (x86)\\\\Vim\\\\vim72\\\\gvim.exe" -f
Then while in a text box you use Ctrl+I and it will open gvim for editing. When you save and exit it will update the text box.
There is an experimental way to directly embed the real vim in firefox using embedded editor - though it requires mozplugger and will only work on Linux.
Try out the wasavi extension. You might want to check out the all versions page to make sure you try out the latest version. (Copy of this answer.)
You can also use the ViewSourceWith addon to achieve the same. Just right-click on any text input and you can edit it using Vim.
As said by others,
as a Vi/(g)Vim user you'll probably want to look at the Vimperator addon, which also provides the what you ask:
inside a textbox, hit <C-i> to launch the external editor.
(can be defined in _vimperatorrc: set editor=gvim -f )
A hint for Mac users: if you want to use "It's all text" with vim, the easiest way is to use http://code.google.com/p/macvim/ . Point "It's all text" to the mvim script that's provided along with the .app (you can place this script anywhere, I choose /usr/bin/ so that I can load mvim from the command line)
Pterosaur is a Firefox plugin that allows you to use Vim in all input fields. It uses an actual Vim process in the background so it has all the functionality you expect, including reading your .vimrc configuration and your plugins.
With Firefox-57 on Linux, I installed textern https://addons.mozilla.org/en-US/firefox/addon/textern/, and found it to be a suitable replacement for ViewSourceWith for editing text boxes.

Resources