Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unix]

Unix version of Vim.

1
vote
0answers
52 views

Standard Vim commands not working [closed]

As someone who just started learning Vim, I've been trying to write script files to accomplish basic tasks. However, despite writing #!/bin/bash on the header, it looks like my script.sh file is not ...
1
vote
0answers
47 views

How to differentiate within vim the Unix platform it is running under? [duplicate]

How, from within vim (.vimrc), can I tell if I am running under Linux, AIX, Solaris, HP unix, etc... It is easy to test if vim is running under Unix, Windows or Mac with: if has("win32") <...
1
vote
1answer
56 views

How do I move cursor around on unix shell using VIM commands? [closed]

I'm a vim user and forgot to grab my csh/vim settings before leaving my prev company. Basically, when tooling around my unix shell, I used vim commands (eg go back and forth using VIM quick-keys, ...
5
votes
2answers
164 views

Vim custom key mapping not working in superuser mode

I have a custom key mapping jj to escape, it works for normal file edit but when I open the file as a superuser the key mapping doesn't work anymore, why? I use Antergos os.
-2
votes
1answer
135 views

What are the basics of vi editor? [duplicate]

I want to know the basics of vi editor because I am new to linux and currently I am using ubuntu 16.04.
7
votes
1answer
2k views

How to preview the result of markdown file edited in vim?

I use vim to edit latex, but latex is bit too heavy for taking notes casually on daily basis, so I decided to use markdown instead. So, I want to configure vim so that I could view markdown ...
2
votes
1answer
43 views

Is there a platform independent way to use “${ENVVAR}more_text” in vim?

I just discovered that I am able to use ${ENVVAR}more_text in a vim installation on Unix, but not if installed on Windows. In Unix, I did in a shell: export ABC=/tmp/ echo foo>${ABC}foo gvim ...
5
votes
1answer
445 views

How can I automate filetype detection when using sudoedit?

sudoedit/sudo -e is often used for safely editing files as root. The way it works: sudoedit copies the named files to temporary files Then it opens the temporary files using the commands specified by ...
8
votes
4answers
820 views

Put a process started with ! in the background

If I do this from the shell: $ sleep 100 I can make it go to the background by doing: ^Z $ bg And then continue using my shell. You can get the same effect by adding a & to the end of the ...
9
votes
2answers
2k views

How to write whole buffer to standard output from the command line?

I would like to write whole buffer into standard output (/dev/stdout) instead of the file and the following command works as expected while editing the file: :w >> /dev/stdout Hint: Press ...
7
votes
1answer
242 views

Can visual select mode be integrated with the Unix selection clipboard?

Is it possible to configure vim (obviously with :set mouse=a) and/or gvim such that the visual selection modes automatically integrate with X's selection buffer? I am aware of how to setup the copy ...
15
votes
4answers
3k views

How to edit content from the standard input?

I would like to edit content in vim which was dynamically generated from the command-line without having the file yet. In example: $ echo This is example. | vim /dev/stdin $ cat /etc/hosts | vim /...
27
votes
4answers
2k views

Terminal borked after invoking Vim with xargs

I've sometimes tried invoking Vim using xargs, like this: find . -name '*.java' | xargs vim … which kind of works: As Vim launches, I see the following warning flash briefly: Vim: Warning: Input ...
12
votes
4answers
6k views

How do I edit crontab files with Vim (I get the error: 'temp file must be edited in place')

How do I edit crontab files in FreeBSD? $ crontab -e # ... I do my thing in vim & :wq "crontab.9ZcXiFaawt" 6L, 203C written crontab: temp file must be edited in place Exit 1 Using EDITOR=nvi ...