Cygwin Split Terminal Vertically - cygwin

I've read online to split the window to do Ctrl+a | or Ctrl+a Shift+S but its not working for me. I am hoping I'm just missing a setting somewhere in cygwin or maybe need to upgrade something.

I don't see that option for Cygwin itself, but those commands match up to options in GNU Screen: http://aperiodic.net/screen/quick_reference

Why don't you install Tmux ?
IN the latest Cygwin version it's included in it's package. For more info refer to:
https://gist.github.com/zlalanne/8188248

Related

How to run a program in Atom Editor?

I found Atom editor as good free alternative to Sublime text editor. Not able to find a straightforward way to run a program in Atom editor. In my case, I am trying to run a java program. Please let me know if it's possible? If yes, please describe the steps to follow.
I find the Script package useful for this. You can download it here.
Once installed you can run scripts in many languages directly from Atom using cmd-i on Mac or shift-ctrl-b on Windows or Linux.
Click on Packages --> Commmand Palette --> Select Toggle.
Type Install Packages and Themes.
Search for Script and then install it.
Press Command + I to run the code (on Mac)
You can go settings, select packages and type atom-runner there if your browser can't open this link.
To run your code do Alt+R if you're using Windows in Atom.
For C/C++ programs there's very good package gpp-compiler.
Shortcuts:
To compile and run: F5
To debug: F6
If you know how to launch your program from the command line then you can run it from the platformio-ide-terminal package's terminal. See platformio-ide-terminal provides an embedded terminal within the Atom text editor. So you can issue commands, including commands to run your Java program, from within it. To install this package you can use APM with the command:
$ apm install platformio-ide-terminal --no-confirm
Alternatively, you can install it from the command palette with:
Pressing Ctrl+Shift+P. I am assuming this is the appropriate keyboard shortcut for your platform, as you have dealt ith questions about Ubuntu in the past.
Type Install Packages and Themes.
Search for the platformio-ide-terminal.
Install it.
This package in Atom can run scripts.
Atom script package
press Alt+X for the running script.
For running javascript you need to install 'node js'
Also pressing ctrl+shift+i in atom gives developer option like chrome
you can test javascript code side by side in atom editor.
In order to get this working properly on Windows, you need to manually set the path to the JDK (...\jdk1.x.x_xx\bin) in the system environment variables.
You can try to use the runner in atom
Hit Ctrl+R (Alt+R on Win/Linux) to launch the runner for the active window.
Hit Ctrl+Shift+R (Alt+Shift+R on Win/Linux) to run the currently selected text in the active window.
Hit Ctrl+Shift+C to kill a currently running process.
Hit Escape to close the runner window
You can run specific lines of script by highlighting them and clicking shift + ctrl + b
You can also use command line by going to the root folder and writing:
$ node nameOfFile.js

Why can't this menu item work?

I got this in my vimrc:
:so menu_format.vim
and in menu_format.vim, this:
"... other menu items that work
menu Format.nbsp_space <ESC>:%s# # #gec<CR> //(the 1st blank is 0xa0, the 2nd is 0x20)
"... other menu items that work
On Windows it works (been using it for a while), but on Linux Mint 17 vim gives:
E319: Sorry, the command is not available in this version.
I tried %s# # #gec on command line, it worked, too!
I knew how to fix this: %s#[\xa0]# #gec would do. I just wanted to know why there is such a difference, and it made me doubt the portability of my vim scripts.
BTW, I built vim (7.4.560) on both Linux and Windows with the same configuration, both use the same menu_format.vim.
It looks like you only have the minimal version of Vim named vim-tiny; it only provides a minimal vi-compatible implementation. The E319 implies that the :menu command is not available, the :substitute does look fine and should work.
To get the full Vim (and graphical GVIM), install the following package:
$ sudo apt-get install vim-gnome

How to have vim leverage system clipboard in Mountain Lion

I'm trying to get VIM to access the system clipboard. As I see it, here are my options:
Recompile VIM and specify that access to the clipboard, per this post.
Install a newer version of VIM using homebrew, per this post.
I'd prefer to do the second option. Does anyone know if this will actually solve the problem I'm having? Also, are there other solutions to this copy/paste problem that haven't been listed here?
MY SOLUTION: I ended up installing MacVim and making it the default Vim. I found this post helpful. I ran this command:
brew install macvim --override-system-vim
then modified my .bash_profile and that was it.
You are probably using a version of Vim that was not built with clipboard support. Of course the solution to this "problem" is to use a version of Vim that is built with clipboard support.
What does $ vim --version say?
There are many answers on SO describing your options, either related to Ruby or Python support or to clipboard support. The solution is the same every time: install a proper build. Just pick the process you are most comfortable with.
The absolute simplest solution is to install MacVim and use the bundled mvim script to run MacVim on the command line. It's totally painless and guaranteed to work.
I don't recommend building from the sources as it can be a needlessly frustrating task.
Homebrew and MacPorts are also good options but I don't like all the symlinking that is done in Homebrew's case. YMMV.
You have asked the question more than 17 minutes ago. That's more than enough time to try all your options. Did you actually try something?
You can try using the fakeclip plugin.

vim E365: Failed to print Postscript File

I don't print from vim often, so I am not sure when this happened.
I cannot print (ha[rdcopy] from vim or gVim.
I get the error
E365: Failed to print Postscript File
I am running on Ubuntu 10.04.
I am looking for ideas on things to configure as well as anyone who has had experience with this problem and might have an answer.
Not a lot of clues there...
Starting Vim with verbose turned on gvim -V
and doing :hardcopy might produce some clues.
Also, this might also be useful :set printexpr?
You can also check if the regular command lps is working, and whether you have the default printer set up correctly. Another useful command is set pdev=printer_name
I had the same error when my system had two printers configured with no default. Setting a default resolved the problem.
Excellent answer above. A few other pointers I'd like to share after just printing from Vim for the first time:
You can find your printer name in Ubuntu by checking the CUPS interface at http://localhost:631/printers/
To print without the file name header use:
set popt=paper:letter,header:0
Finally, you can print using:
hardcopy
In addition to set a default printer I fixed it installing gtklp:
$ sudo apt install gtklp

Vim at Ubuntu 11.04: Working with clipboard of Unity

The problem is, the old-way method to work with X11 clipboard (through "plus" register) doesn't work in Unity. Has anyone met the problem? And how it was solved?
The problem solves itself after GVim installation. Then "plus" register works as it should be.
Even if you do not have gvim installed or xterm_clipboard enabled, you may use xsel to manage your clipboard (install it via apt-get).
I hope my script will help you: https://github.com/FUT/config-files/blob/master/vim-dotfiles/vim/settings/clipboard.vim
Use :
sudo apt-get install vim-gtk
This will install vim with clipboard support.Run as before: vim
I don't know the unity desktop but I know that it is based on gnome libraries. So if you can use dbus to interact with unitys clipboard, you may consider writing a shell script which uses dbus to set the clipboard content. This script can in turn receive its input from vim if you assign a map to a filter command. Of course this works similarly if you know any other commandline utility which can set the clipboard content.
I used to have the following maps in .vimrc for the old dcop and klipper (the KDE clipboard) which you might customize:
:vmap k :w! $HOME/.vimclip<CR>:silent execute "!dcop klipper klipper setClipboardContents \"$(cat $HOME/.vimclip)\" &>/dev/null &"<CR>:redraw!<CR>
:nmap z :silent execute "!dcop klipper klipper getClipboardContents > $HOME/.vimclip"<CR>:r $HOME/.vimclip<CR>:redraw!<CR>
E.g. to copy press k after making a selection in visual mode. Note, that it copies and pasts line wise.
I have faced the problem again after while. Must say I use vim in GNOME Terminal, not GVim that is also installed.
What is interesting the plus register stopped working approximately at the same time on different computers of mine.
First I though it was a bug because the graphical version was installed as before. But at the end I just started GVim and tested the plus register there. It was working. After that the register began working in the terminal too.
So if you meet the problem again, when you have already installed GVim, just start it. This should help.

Resources