Hot answers tagged

3

The problem is twofold. First, tmux by default converts the control-arrow keys from one type of escape sequence to another. So special keys such as controlleft are sent to vim without the modifier, e.g., left. If you use cat -v to see the different escape sequences, you might see something like this ^[OD versus this (outside tmux): ^[[1;5D The line ...


3

You're almost there, but your regular expression is replacing both the newline and the non-digit with a tab. How about replacing every newline followed by a non-digit with a tab and that same non-digit? %s/\n\(\D\)/\t\1/g The escaping is a bit messy, but basically you have a grouping around the \D that will capture whatever the non-digit is. This is then ...


3

If you are using vim, you may be able to recover some or all of your deleted text because vim stores the 9 most recent deletions in registers 1 to 9, which are saved to a file called .viminfo in your home directory when you exit vim. This registers saved in ~/.viminfo are global, for all files that have been edited, NOT one set per edited file. So if you'...


2

You can use awk: awk '{ print > (NR % 2 ? "odd.txt" : "even.txt") }' a.txt This reads from a.txt and appends lines to either odd.txt or even.txt depending on the current line number.


2

You could create your own vim configuration file, and then create an alias for vim to use that file instead of .vimrc: vim .vimrc-cdnszip Put the following contents into this file: source /etc/vim/vimrc source ~/.vimrc set number " any additional confiuguration you might want... Then alias vim to vim -u ~/.vimrc-cdnszip in your cshrc file. I've never ...


1

By modifying the line (line 406)... call s:X("Special","799d6a","","","Green","") in the jellybeans.vim file you can change the escape character color in strings. Simply replace 799d6a with the hex color code you want the escape character to be.


1

One way to do it is to use the end match marker: %s/\n\ze\D/\t/ Another way to do it is to using negative lookahead: %s/\n\d\@!/\t/ They are not exactly equivalent, the second will also replace the last newline in a file.


1

Commands started in a shell session will have stdout and stderr (standard output and error) connected to that session. You're starting Thunderbird manually (i.e. by typing thunderbird &, not by clicking an icon in a graphical user interface) so its messages to stdout and stderr will arrive in your current shell session regardless of what you're currently ...


1

Most Unix variants support FUSE, which allows programs to define new filesystem types. There are several FUSE filesystems that expose archive contents as a directory tree. This way any application can see archive contents as ordinary files transparently. See Can I store and work with a directory in compressed form? For example, with avfs, you get read-only ...


1

I think you need to use 'colorscheme' rather than 'color' in your vimrc and place it in your local vimrc file (~/.vimrc). Also, you are testing this on python files and vim may need some settings to correctly recognise them. Try adding the following lines to ~/.vimrc: syntax on colorscheme dracula filetype indent plugin on


1

This is how its done in .inputrc: set editing-mode vi $if mode=vi # these are for vi-command mode set keymap vi-command # unbind space " ": "" # bind space-a, space-; " a":beginning-of-line " ;":"$" $endif


1

To start with, it's better to always check the exit status of cd, so cd /WebSphere/was85/mycel/mynode/AppServer/java_1.7_64/bin && ./java -cp /usr/my.jar com/com.my_comapny_witt_entire_name/myMain cmd1 && cmd2 means execute cmd2 if cmd1 succeeds. Now I suspect your problem here is that that script is not being interpreted by that OMVS ...


1

For some reason, it was just a Vim issue: when started in tmux, it loaded default colorsheme, but when started from plain terminal, it loaded desert colorscheme but still calling it default when asked via :colorsheme. Forcing :colorsheme default resolved an issue, so I added colorsheme line in my ~/.vimrc and now it's OK. I have no idea why Vim was doing ...



Only top voted, non community-wiki answers of a minimum length are eligible