Trying to use xdebug on vim - vim

I'm trying to use xdebug with vim on linux. I follow the instructions to install xdebug and after that I can see the information about xdebug if I call phpinfo() from a file inside the apache server.
After open a file in vim, it is supposed that when I press F5 it should show something like "waiting for a new connection on port 9000 for 10 seconds...", but it doesn't show anything..
Any idea?

I would recommend you look at a new vim debugger plugin, called vdebug: https://github.com/joonty/vdebug -- it is actively developed and seems very capable.

I had the same sort of problem, it turned out that my terminal emulator was capturing the keypress and not sending it to vim (I think). Remapping the functions to different keys solved the problem.

It could actually be his/her keyboard. If the keyboard has mult-media functions as well as F1-F12 on them... then there is, usually a "F-Lock" key next to the row of function keys that will turn on/off the function key behavior. Really annoying, IMHO, for the new keyboards sold these days.... and rarely does the keyboard have a light to indicate the ulterior operation of said function keys.
I say this cuz, that is exactly what happened to me just now.

Related

vi not recognizing scrolling, scrolls terminal instead

I have an instance of vi on a remote server that is not behaving like it used to, and I'm not sure what made this happen.
On my local shell, (and the remote server before this started happening), if I scroll with my mouse/touchpad, it would navigate the cursor within vim. I have checked my .vimrc and there's nothing in it relating to the mouse, and I did not make any changes to it before this issue started.
The only thing I can think of is that a few weeks ago, I was trying to figure out how I could split two files in the same vi instance so I could yank from one file to another, and I tried some : commands that I didn't really understand (didn't get any productive results). And also, I ran tmux once, but I don't think there are any . files that are applying unwanted settings (not sure).
I can't find anything to check the vi settings being applied, but I know that my .vimrc is working, and it's not anything in there (if I comment everything out it still behaves this way).
I just want my vi to respond the same way.
Describing the problem more exactly:
If I scroll, the cursor doesn't move, instead it scrolls on the terminal window, and it shows the previous bash commands instead of scrolling the file being edited. If I navigate using vim keys, it still works.
Randomly, I discovered that it actually had to do with the a specific terminal instance that was causing the issue. Closed it, opened a new one, no issue now. If anyone has any insight on why this could've been, I'd love to know.
.vimrc applies to vim not vi, doesn't it ?
the problem of scrolling might come from your terminal emulator as well.
I usually use embedded terminal in VS code which is not ideal (since it's not made for administration ...) but it's practical with keybinds to jump from one window to another, copy paste ...
I know some colleagues who use, mobaXterm or mremoteNG on windows.
I know I should give a go to Terminator, but it's on linux only and I don't want to run a local vm just for that.

Can I disable autocomplete with Alt+Tab on Qt Creator under Linux?

For the most part I very much like Qt Creator, but a few projects I'm working on require me to switch between my editor and my web browser for reference. Qt Creator is currently interpreting Alt+Tab to autocomplete, and then switching my window focus; this is a mild problem but it's really starting to get to me.
I've tried going to Tools→Options→Keyboard and searching for Alt+Tab, but found nothing. Is there a way to get it to selectively ignore the key combination without disabling autocomplete on the whole?
To complete the picture, I'm on Linux Mint 19.04 using XFCE desktop environment; or occasionally Maté. If I need to access something in system settings to do this I'm happy to; I just don't want to keep excessively second-guessing my code when I return to it.
Auto-complete is bound to Ctrl+Space by default, not Alt+Tab. In tools/options/keyboard, search for "CompleteThis" to see what it's bound to.
Maybe what you want is to disable auto-complete and use only manual-complete? That is, have the auto-complete list only show when you press ctrl+space, but never automatically. You can do that in options/text editor/completion.

Linux terminal with full keyboard support?

I made a text editor and I want to port it to Linux such that I can use it remotely via SSH. I don't know much about Linux terminals, so maybe I'm missing something obvious, because I just can't believe that in 2013 there's still no way for a remote terminal to distinguish between Ctrl+M and Enter, or between Ctrl+H and Backspace, or even get any events at all for Ctrl+Left/Right/Up/Down, and so on. I tried ncurses and libtermkey to no avail. The question is, is there any effort or discussion in the Linux community on modernizing or replacing the linux terminal protocol(s) to something that supports full keyboard and mouse interaction and possibly full color, i.e. something that would allow for text user-interfaces without huge usability compromises?
As far as I know, the Linux console terminal just doesn't support this, full stop. If you want to try raising a patch, you could have a go at implementing the full CSI-encoded reporting scheme. It is documented here.
libtermkey will recognise the key sequences if sent, but the fix has to go into the terminal first of all to send them in the first place.

Focus follow mouse in vim

I am aware that the mousefocus option is only supposed to work in gVim. But I was wondering, if it's possible to have the console Vim switch to different windows in response to mouse clicks, would it be not possible to easily add following mouse movement to it, too?
I'm an xmonad user, I love the focus following the pointer feature, I do a lot of pdf viewing and browsing while writing in Vim, and I'd be so much happier if I didn't have to keep mentally switching back and forth between two different types of focus changing.
If that's completely not possible, I guess opening new Vim windows (as with :split) in new instances of the terminal is no easier to do?
It would not be at all simple to add this. Using the mouse within the terminal works by vim sending control codes to the terminal requesting that mouse actions be sent as part of the input stream. Terminals only report clicks not changes in the pointer position, so vim has no way of knowing where the mouse is.
With major changes it would likely be possible for a vim with X support to get pointer activity directly from the X server, but that would likely be reported by pixel rather than by character so further work would need to be done before it could determine which vim window is currently under the pointer.
set mouse=a
should do the trick but it will probably depend on your terminal emulator. See :help 'mouse'.
This works for Windows 7/Cygwin 32bit mintty/vim 7.3: (I DO NOT use gvim!)
Having installed this: http://ehiti.de/katmouse/, I can scroll the window under my cursor without having to have clicked to select a window, click-selecting of single vim-windows works, too. It does not pull the vim window to the foreground, if another window overlaps it, if that is what you desire. Still it can be scrolled without click-selecting it first.
So:
Check if there exists a software paket for your distribution, that implements your desired mouse behavior on the OS level. When this works for my self-compiled vim in cygwin, it might very well work with console vim on linux, too.
This post here serves as evidence, that it is possible at all, that is the reason this was not made a comment. When I am on linux again I will investigate this further and update this post, but that might take a while.
On set mouse=a: The vim help states you a need a terminal capable of handling mouse inputs, further information can be found here. :help ttymouse might also be helpful, i.e. if you have a xterm-compliant console, but :help term is set to something else.
UPDATE: (Freshly installed Fedora 19 with packages, no self-compiled stuff.)
Fedora 19 + se mouse=a = scrolling in single console vim window with several buffers opened next to each other independently works, too. Window manager used is LXDE.

Creating a ctrl+tab keybinding in PuTTY

I'd like to be able to map the vim commands :tabnext and :tabprev to CTRL+TAB and CTRL+SHIFT+TAB respectively. Unfortunately, I seem to be running into the problem where PuTTY eats these character combinations.
I've tried searching for information, but to no avail. I'm pretty sure this is a PuTTY thing but there doesn't seem to be any sort of help/reference area for the application.
I am curious if anyone here has any experience or suggestions for figuring this out.
#rmeador: try mapping the key combo within vim.
I have attempted to do this, but it doesn't appear like vim is getting the combo. I'm not certain if this is related to the term settings or an issue with PuTTY.
PuTTY doesn't send anything when you press Ctrl+Tab.
You can patch PuTTY as it is described here: Using Ctrl+Tab in GNU Screen over PuTTY
I believe that at this time, using Ctrl+Tab is not possible with PuTTY, because PuTTY does not allow you to configure specific translations for keys. Here is a decent article that shows how you would set this up if PuTTY did support this feature:
http://www.staldal.nu/tech/2009/01/10/how-to-use-ctrl-tab-in-gnu-screen/
If you use (or would consider using) a hotkey/macro program like Autohotkey, you could emulate this behavior yourself. For example, this Autohotkey config script would do exactly what you want:
#IfWinActive PuTTY
^Tab::Send :tabnext
^+Tab::Send :tabprev
#IfWinActive
(Note that this example is just looking for any window title starting with PuTTY, so you'd have to adjust based on your title configuration.)

Resources