How do i remove the title bar in the cygwin mintty terminal window ?
there is no option in the options -> window configuration
One way would be using mintty's -B (--Border) option when invoking it. Check [GitHub.Mintty]: mintty (or man mintty) for more details.
As a note, on my (Win 10) machine mintty's window quickly disappears, when specifying the option.
Related
Is there a command in cygwin terminal that when it's executed, the cygwin window is bring to the top/front? (To notify user that the job it's running is done)
First, iconify (ESC[2t) the window and then de-iconify (ESC[1t) it directly.
This brings the window in front of all other windows.
echo -e "\e[2t\e[1t"
Btw. I tested first with ESC[5t (Raise the xterm window to the front of the stacking order)
But this doesn't work as expected, as it only brings the window to the front of all mintty windows.
Is it possible to enter mark mode(to mark text in Linux terminal) without mouse. In CMD you can ,alt+space+e+k. Can it be done natively without 3th party programs?
Regardless of your terminal you can enable vi mode for you shell, both bash and zsh support this.
A quick one (without installing third party programs) would be to set -o vi in your shell to enable vi and use the shortcuts
If you don't like it you can always come back to emacs: set -o emacs
What I'm searching for is a command similar to:
gvim --remote-silent FILE
But without the FILE part. So basically: launch a new GVim instance if none exists, and otherwise activate/focus the existing window. I prefer not to use a dummy file (eg. gvim --remote-silent ~/.vimrc) as that would mess up my bufferlist/MRU.
The reason I'm looking for something like this, is that I'd like to configure a shortcut for GVim (Mod+8) to use in the Linux XFCE window manager.
You can re-activate an existing GVIM instance with
$ gvim --remote-send ":call foreground()<CR>"
That fails when there's no existing server. In that case, just spawn a fresh instance, or check beforehand with gvim --serverlist.
In Ubuntu gvim --remote-silent works but doesn't activate editor window and just waves its icon in sidebar. To change this behavior look here.
This behaviour can be changed from the command line, open a terminal
and type:
dconf write
/org/compiz/profiles/unity/plugins/core/focus-prevention-level 0
To restore the default value:
dconf write
/org/compiz/profiles/unity/plugins/core/focus-prevention-level 1
I have installed mintty. After that I am not able to open gvim. As suggested in same question for emacs I use:
1) mintty gvim
this opens a new window with message :
E233: cannot open displayE852: The child process failed to start the GUI
Press ENTER or type command to continue
Also I have set : export DISPLAY=":0"
what I am doing wrong
You probably don't have an X server running. Look here for instructions on setting it up. Personally, I find it easier to just uninstall the cygwin version of gvim and use the windows version instead.
I had the same problem when starting gvim and was getting the error message as above.
My default DISPLAY setting is :0.0
However, I noticed in the output of my startxwin, that it said
"""
Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
winMultiWindowXMsgProc - DISPLAY=:2.0
winInitMultiWindowWM - DISPLAY=:2.0
winProcEstablishConnection - winInitClipboard returned.
"""
I set my display to :2.0 and it works now.
ie
export DISPLAY=:2.0
Hope this helps.
[Further to this, the script seems to check /tmp/.X11-unix/Xn where n in Xn is a number.
It seems I had X0 and X1 already there, probably leftover from an older bad shutdown.
Deleting this seems to restore it back to using :0.0
]
you can define a function in your .bash_profile (you need to make sure gvim.exe is in your $PATH)
vim() {
echo "cygstart gvim.exe --remote-tab-silent $(cygpath -w "$#")"
cygstart gvim.exe --remote-tab-silent $(cygpath -w "$#")
}
For me, gvim was being picked up from /usr/bin/gvim
I installed gvim as a windows application and then invoked it from its windows path directly as
[cygwin$] /cygdrive/C/Program\ Files\ \(x86\)/Vim/vim74/gvim
And it worked.
Like user2250246, I just punted on trying to get cygwin's gvim to start working again, but I didn't want to type or alias gvim. (Which I probably should've. The alias is easier.)
I added the Windows app's gvim's path to my Windows environment variables:
Get the path to gvim by finding its icon in your Start menu and
right-clicking on it, then opening Properties. Find the Target link
and copy all but the final 'gvim.exe'.
Go to Control Panel -> System -> Advanced System Settings -> Environment
Variables -> System variables. Select Path. Click Edit.
Paste in that path at the start. Click OK. Click OK.
Then Cygwin will put your Windows gvim on its path, but it will put /usr/bin ahead of it on its own path. So
mv /usr/bin/gvim /usr/bin/gvim-screwed-up
mv /usr/bin/gvimdiff /usr/bin/gvimdiff-screwed-up
and your cygwin will find & run the Windows-installed gvim, with or without your cygwin X server running.
Unfortunately, it will no longer load your cygwin .vimrc! You'll have to fix that yourself.
When running a vim instance in gnu screen hitting shift enter in insert mode adds an 'M' and then a newline, rather than just a newline.
Does anybody know what the problem might be, or where to look?
Relevant system info:
Ubuntu 8.04.1
Screen version 4.00.03 (FAU) 23-Oct-06
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 31 2008 12:20:21)
Included patches: 1-138
Konsole 1.6.6 (Using KDE 3.5.10)
Thanks to the comments. When checking the value of $TERM I noticed that it was xterm (as expected), but within screen $TERM was set to screen-bce. Setting TERM=xterm after launching screen resolves this issue.
Adding the following to ~/.screenrc solved the problem without having to do anything manually:
term xterm
Missing info from your question:
Where do you run screen and see this issue? Some terminal app (KTerminal, Gnome terminal, virtual console etc) or remote session (eg putty, ssh from another computer)
do a “echo $TERM” and tell us its output
do a “cat -v”, press Shift-Enter, then Enter, then Ctrl-D and then tell us what is output.
First, you could fix your $TERM for within konsole. Install "ncurses-term" and configure konsole to set $TERM=konsole-256color. Then configure screen with "term screen-256color". Or 'konsole' and 'screen', respectively, if that's your preference. Konsole and screen are not xterm and doesn't support everything xterm does, so using incorrect $TERM can lead to bad things.