Questions tagged [vim]

Vim is an open-source text editor with a steep learning curve that leads to high efficiency in many tasks related to text edition. If you wish to start with vim, try to run “vimtutor”, which will teach you basic commands.

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.

Vim is often called a "programmer's editor," and so useful for programming that many consider it an entire IDE. It's not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.

Visit the home page of vim or visit the Official Vim Tips Wiki.

95 questions
1
vote
1 answer

How to prevent users from renaming files while providing write permissions on Linux

For some special purpose, I want to prevent non-root users of the Linux Server from changing/renaming the filenames. However, they can modify and write to the contents of the file. How to do this from command line.
manav m-n
  • 123
  • 5
1
vote
2 answers

Why can't I change the mode of /proc/sys/kernel/pty/max even when I am root?

Since pty is limited, I want to modify the content of /proc/sys/kernel/pty/max. The original value in max is 4096, and now I want to modify it to 10000. [root@home pty]# pwd /proc/sys/kernel/pty [root@home pty]# ls -lh total 0 -rw-r--r-- 1 root root…
giantforest
  • 239
  • 1
  • 4
  • 15
1
vote
1 answer

Vim Doesn't Source All Commands In auto-command Group

I have a vim auto-command group that looks like this: augroup filetypedetect_wiki au! au! FileType vimwiki iabbrev cfo %% TODO {{{1hhhhhhhhveh au! FileType vimwiki iabbrev cfc %% TODO }}}1hhhhhhhhveh au! FileType vimwiki…
Tom Purl
  • 549
  • 1
  • 3
  • 13
1
vote
3 answers

Unable to find the right fileformat for Screen's logs in Vim

I see alt text http://files.getdropbox.com/u/175564/fileformat-problem.png where I have ^M and ^[ at various places. The former seems to be enter, while the latter apparently the end/beginning of the line. I would like to get the purple symbols out…
1
vote
2 answers

Split large sql file by location of string OR start sql from last fail

I have a 15GB sql file which is a backup of a database. The problem I have is that half way through it, it failed. Luckily, I know which table to pick up from. Is there a way I can split this SQL file by the starting point of the table I need to…
David
  • 841
  • 3
  • 14
  • 31
1
vote
1 answer

Automate user quotas for edquota to bypass vim

Possible Duplicate: Setting up disk quota on ubuntu for multiple users When assigning user quotas, one has to use edquota. However, this brings up the vim editor. Is there any way to bypass this. Observe this pseudocode for username in usernames …
puk
  • 285
  • 1
  • 6
  • 18
1
vote
1 answer

vim uses /tmp for shell functions

When vim uses the shell given a colon !command, it does so through the /tmp filesystem. How do you force vim to use ~/.vim/tmp/ instead? It also uses /tmp for help files when zcat is required to read some of the manuals. TMPDIR doesn't work for this…
atx
  • 1,281
  • 1
  • 9
  • 26
1
vote
2 answers

Some copied files have additional blank lines

In the process of comparing files between 2 versions of an application i've noticed that a number of files seem to have gained additional blank lines throughout the file. These files were never uploaded by FTP, purely copied from one location to…
robjmills
  • 990
  • 9
  • 26
1
vote
2 answers

Lighttpd broken when serving from Virtualbox shared folder

I've got a lighttpd web server set up on a Debian 6 guest in Virtualbox 4. I've got the www directory in a virtualbox shared folder, so that I can develop a website in the Windows host. My problem is that two otherwise identical files created by…
1
vote
1 answer

Some keys not working under screen in vim

When using vim under screen, some keys are not working. Namely, Pressing Alt-Left produces '3D' and Alt-Right produces '3C' Also, pressing Up/Down when scrolling list of files in Command-T plugin produces 'A' and 'B' respectively. When I exit the…
Art
  • 297
  • 4
  • 12
1
vote
1 answer

Telnet hangs with vim

I'm starting to use telnet for remote access and control of others windows pc. The problem that I'm facing is that when i start the VIM program the telnet session hangs and it doesn't respond to any key press. What is the reason behind that?
mjsr
  • 181
  • 7
1
vote
2 answers

Remote editing with diff / patch?

I do most of my work in vim. I much prefer to edit files using vim locally rather than sshing into a server and running vim there, for many reasons, one of the most important being UI responsiveness on a slow connection. I know that I can edit…
Mike
  • 425
  • 1
  • 4
  • 11
1
vote
4 answers

Editing root-writable files with only sudo rights

Our sysadmins login to boxes using unprivileged accounts with sudo rights. I often, out of habit, open files in vim instead of sudoedit. I do not want to get into the habit of using sudoedit. My colleague suggested creating a vim symbolic link in…
Belmin Fernandez
  • 10,799
  • 27
  • 84
  • 148
1
vote
2 answers

VIM Color Scheme issue(s)

My Problem is that I am having trouble installing and using a new color scheme for VIM 7.2. Here's what I'm doing to install the new color scheme: I navigate to the terminal on my local machine: Ubuntu 10.04 > Main Menu > Applications >…
bitcycle
  • 155
  • 1
  • 9
1
vote
4 answers

Unable to grep sourced Files in Vim

I have files which I source in my files. I want to search them, when I am at a file which have these sources. I run unsuccessfully !bufdo grep source and !bufdo grep source % Example of .zshrc which sourced PATHs I want to grep #…