gVim + US-International: Not combining dead keys with space - vim

I am using "United States-International" on Windows 7, which causes problems in combination with gVim 7.3.
In the US-International keyboard layout the keys " and ' are dead keys, that means, you can combine them with another key. For example pressing "+a results in ä and the keys '+a in á. In order to insert one double quote you simply have to hit "+space.
But when I enter "+space in gVim (in edit mode) nothing happens, no character is inserted. When I further hit space, only spaces are inserted. It seems that the keys "+space are not combined to one " character. However combining " with a to ä works as expected.
When I press " followed by spaces, the " is buffered until I enter another char and is then combined with that (if possible). Examples:
"+space+space+a => » ä«
"+space+space+b => » "b«
"+space+space+" => » ""«
Does anyone know how to solve this problem?
BTW, the behaviour isn't affected in vim (through cmd.exe)

My current workaround: Use the latest gVim 6.x version, those don't have the described problem.

Are you in edit mode or command mode when you do this? It sounds to me like you are expecting command mode to work like edit mode. The quote character in command mode affects registers and the clipboard (e.g., for copy/paste).

I noticed that you can press " and then a to produce ä. On my machine (Windows XP) if I press and hold " and <Space> at the same time, it seems to work. If I try to press " and then <Space>, I get unexpected behavior.

Same problem here since 7.3.
I didn't try Yongwei's builds, but I built Vim myself (which was pretty straightforward using Wikia's instructions) and the problem went away \0/
Edit Spoke too soon : the 32bits version works fine, but the 64bits version is still broken :(
Edit Workaround: the 64bits version works fine if compiled with OPTIMIZE=SPACE
In some parts of the code, optimization is disabled using #pragmas, so a real solution would be to do the same thing for the precise code parts that need it so we could have optimized code for the rest of the program.
Edit I was building vim using the compiler that comes with Visual Studio 2010, which apparently can produce incorrect code when optimizing (see here). The solution was to install Visual Studio Express 2013 to get an updated compiler and build vim using this new version.
For what it's worth, here's the simple build script I used to get a python 2.7-enabled vim :
REM TODO: cd to your vim source code directory
:: Set environment for wanted options before building Vim.
set GUI=yes
set DYNAMIC_PYTHON=yes
set PYTHON=C:/Python27
set PYTHON_VER=27
set NETBEANS=no
set FEATURES=HUGE
set CPUNR=i686
set WINVER=0x500
set OLE=yes
set CPU=AMD64
set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
REM setup environment to use VS2013's compiler
call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86_amd64
nmake -f Make_mvc.mak clean
nmake -f Make_mvc.mak

I have the same problem with the official builds since 7.3 and including the current 7.4 beta. My "solution" is to use the unofficial Yongwei's builds (which also include all known patches) you can find the current build (7.3.1251) here: http://wyw.dcweb.cn/#download
I emailed VIm's author about that a few years ago but he had no idea where this problem could come from...
Once I also solved this problem by compiling VIm myself but it's easier to use Yongwei's builds as they include all the patches and are compiled with more features than the default build.
UPDATE: 2014-08-20
I've made a patch to address this issue: https://code.google.com/p/vim/issues/detail?id=250&sort=-id
(you can easily compile VIm under windows using MingW or MingW64 (easier) and the Make_ming.mak in Vim's src folder)
UPDATE: 2014-08-22
Patch included in VIm 7.4.413

Related

Use GVim as GNU OCtave's text editor on Windows

I am using Windows 10 and the text editor I am used to is Vim. I just intalled a shiny new GNU Octave copy (version 7.2.0). The Octave editor is pretty limited and I know it is possible to override it to vim/gvim. I have tried different things to make it work, without success.
Using the Preference->Editor pane
It seems that Octave is never able to understand what I put in there. I have tried using gvim, gvim.exe, a full path to my copy of gvim, etc. When I go to the editor, I either get:
or, when using a full path to the editor (ex. here: C:\Program Files (x86)\Vim\vim82\gvim.exe):
I think Octave is unable to deal with spaces in paths (at least from this edit box). It have also tried using single and double quotes, but it also fails:
Using an .octaverc file
When nothing worked in the GUI, I tried configuring an .octaverc file, as described in the GNU Octave Wiki:
edit mode sync
edit home .
EDITOR('gvim')
I tried with vim as well, full paths, etc, to no avail. Now I know that this file is read and executed when lauching Octave because when I put garbage in it, I see it in the Command Window. I also found a Set Path option in the GUI and I tried adding the path to gvim there, but it had no effect:
Question
I can I make my GNU Octave editor gvim, on Windows? I would like to use my current installation (default for Octave, default for Vim as well...)

How to use IDE keymap in GoLand Terminal

Until recently I was able to use keymaps such as Ctrl+Right to move the caret to the next word in my Bash Terminals embedded in GoLand on Ubuntu 18.04. I'm not sure what has changed but these no longer work. Now if I try to use the example shortcut it just types C. What settings do I need to change to get this to work? I have tried this with both "Tools>Terminal>Override IDE shortcuts" checked and unchecked.
Turns out this was not an IDE issue. Whilst trying to add support for using Ctrl + Backspace for deleting words, I had created a ~/.inputrc file which was overriding my /etc/inputrc file. Deleting this file fixed the problem.

vscode on WSL issue: editing cursor goes backward when opening bracket or braces

I'm running vscode into a Debian WSL subsystem on top of my Windows 10 workstation, thanks to Xfce4 window-session and vcXsrv X server.
I'm working on a Python 3 project and I have a strange behavior with my vscode editor running on WSL that I can't reproduce with either the native Windows or Linux build : Let's say in want to access a dict key, I'd type the following code:
my_dict[
here I'm expecting IntelliSense auto-close the bracket and keep the cursor between the brackets. This what usually happens (at least with my native vscode on Windows and on my vscode on my /real/ Linux box). But this is not what happens on my WSL !
Seems the cursors goes backward before actually typing the open bracket so the bracket is typed one char earlier, and finally don't close the bracket, To be clearI get the following typed in the editor:
my_dic[t
If I workaround by typing a space before typing the opening bracket, I get the same behavior but this time as the earlier char is a space IntelliSense is functionning /almost/ as expected, forwarding the typed space at the end of line (bellow the '$' represents EOL) :
my_dict[] $
I experienced this with brackets ([]) and also braces ({}), with python code and also JSON files, so I don't wonder this is related to language extension.
Last but not least, the only installed extension, is "Python 2019.1.0" by Microsoft and the setup is full stock with no customization at all...
I spent hours reading vscode documentation and browsing for similar issue, with no luck (maybe wrong keywords ?), so any hint will be appreciated, thanks !
In the backend, you're still utilizing conhost from the Windows Console to run all your terminal commands. Some cursor behaviors don't work properly in earlier builds of Windows on WSL (but do work fine on Windows). Try to update to the latest and see if you still encounter the issue. If you do then, check for an issue in https://github.com/Microsoft/console and create one if not there.

Error opening vim

I just installed VimPlug and several golang imported tools and plugins. I'm not sure where the first place to look at in order to disable this installation of oracle since it's been replaced with guru.
$ vim
Installing golang.org/x/tools/cmd/oracle
Error installing golang.org/x/tools/cmd/oracle:
Press ENTER or type command to continue
Vim-Go - all in one Go plugin for Vim. The best plugin I ever saw. Thanks to Fatih Arslan (btw he made a lot of excellent tools for Go).

Vim as Visual Studio IDE

I have spent lot of time doing research on VIM. I am Windows guy since last 6 yrs and was using VS.
Now started working on Linux. I want to make VIM as close as possible to VS.
I want features like
Project Navigation
Files in Different Tabs
Search in Project
AutoCompletion
I have found plugins for the above requirements
Project Pligin
MiniExplore
Taglist
OmniComplete
I am not able to correctly set vimrc script.
When I try to open file from Project it gets open in different tabs.I want to get it open in different buffers.
Also when I want to close file in buffer , complete window gets closed.
Open taglist and project window makes all mess.
Has any one done settings with these plugin..
Could you guys please post your vimrc files??
It will save lot of time for newbies like me..
Vim is a very different tool than Visual Studio. Plugins may help you get certain bits of functionality you desire, but do not expect them to work exactly like VS, work well together, or even work at all.
If you are looking for a programming environment more like Visual Studio, there are many good graphical IDE's you can use such as NetBeans, Eclipse, Code::Blocks, KDevelop, Anjuta, etc. Some of these tools are, IMHO, better heavyweight IDE's than Visual Studio, and all are available on Linux for free.
You should either learn to use Vim the way it was built to be used, or find a different tool that suits you better. Shoehorning Vim into a surrogate for Visual Studio will probably cause you more pain than it's worth.
Yes it's different to VS, but that doesn't mean it can't be used in the same way. It's just not as easy to do it :)
Personally I go the other way and use ViEmu to get VS to behave like VIM. But I'm not in the same situation as the author of this question.
Why not have a dig through some uploaded vimrc files on dotfiles.org?
You can use the following script, Trinity.
http://www.vim.org/scripts/script.php?script_id=2347
It will require 3 more scripts, and Vim will look like an IDE.
The TagList at left, a file exporer (NERDTree) at right, and Source Explorer at bottom.
Also, you can find some very useful blog entries at
http://kevin-berridge.blogspot.com/search/label/vim
The author, Kevin, explains how to compile solutions form inside Vim. He also shows interfacing and jumping between them which is very useful too.
Furhermore, there is the script vim-visual-studio which can be found at
http://code.google.com/p/vim-visual-studio/
This script is using Python extension. I have Python 2.5 installed in Windows. I am using Gvim 7.2 which is compiled with Python 2.4. So, I have replaced the executables of Gvim as explained here:
http://www.gooli.org/blog/gvim-72-with-python-2526-support-windows-binaries/
So, Gvim became compatible with Python 2.5 and raised no problems. Also, a menu entry "Visual Studio" has appeared as expected. It connects to Visual Studio itself, and it works perfectly. It does not just compiles a file, it can compile a solution containing more than one project as in Visual Studio. You can even use the Vim's 'quickfix' feature. Hope this helps.
If you really want to have vim as the front end, try Eclim. It uses Eclipse as a backend daemon for code completion and project management, and vim as the interface.
If you only like vim because of the vi key bindings, but want it to be more IDE like, you could try the latest MonoDevelop that has it built in.
These plugins used to exist long before vim had tabs. I'd be quite surprised there isn't a way to tune these plugins to split windows instead of opening tabs.
Now I can't help you much as I don't use these specific plugins but other ones. You should look at their help (:h project, :h taglist, etc)
PS: in vim terminology (it will help you browse the help files), what you call "buffer" is actually called "window", while a "buffer" is just the text you are working on, it may be associated to a file, or not. For a given buffer, there may be no or several window displaying parts of the buffer.
you can give a try to eXvim
http://code.google.com/p/exvim/

Resources