Tagged Questions

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 ...

learn more… | top users | synonyms

0
votes
2answers
43 views

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 ...
0
votes
2answers
30 views

vim create one's own syntax configuration file

I'm trying to create my own syntax configuration file for vim. I have then created a ~/.vim/filetype.vim file with the following content: augroup filetypedetect autocmd BufNewFile,BufRead ...
1
vote
1answer
74 views

Linode Lish Shell Vim and Nano rendering troubles: lines not appearing / cursor positions wrong

I'm using a linode VPS and I just cloned one of my servers to my development server as I've done many times before. As usual SSH is inaccessible until /etc/network/interfaces is correctly updated. I ...
0
votes
1answer
78 views

Automate user quotas for edquota to bypass vim [closed]

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 ...
1
vote
1answer
185 views

How do I enable characters like [Æ, Ø, Å] in PuTTY/Debian?

I'm using VIM through PuTTY to work on my development server, but it gets rather difficult when I have to work on files containing characters like those mentioned in the title. Not only does it make ...
3
votes
1answer
554 views

How to enable color in Vim over SSH?

I have two remote servers: Server 1: Linux 2.6.18-238.12.1.el5PAE i686 / VIM - Vi IMproved - version 7.0.237 Server 2: Linux 2.6.18-338.19.1.el5.lve0.8.36 x86_64 / VIM - Vi IMproved version 7.0.237 ...
0
votes
3answers
112 views

Vim and Solaris Express 11 - Unable to Backspace

I've just installed Solaris 11 Express, and I can't for the life of me work out how to get vim to backspace correctly. The backspace key works fine at the normal console. However, under vim, it ...
1
vote
1answer
42 views

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 ...
0
votes
2answers
130 views

256 Color Issue when using GNU Screen inside GNU Screen

When I have a SSH session in GNU Screen to another machine on which I'm also using GNU Screen, 256 colors don't seem to work. The $TERM is still set correctly. However, if I run Vim, the theme does ...
1
vote
2answers
53 views

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 ...
0
votes
3answers
62 views

How paste text from firefox to GVIM on ubuntu11?

I found that I can not paste text to GVIM from firefox or other editor, anyone can tell me how to set my GVIM(GNOME) on Ubuntu11 ?
0
votes
0answers
87 views

Mac OSX: make vim use Active Perl instead of System Perl

I have Active Perl installed under Snow Leopard, with the ActivePerl's path prepended to my PATH in ~/.profile like this: export PATH=/usr/local/ActivePerl-5.12/bin:$PATH so Active Perl gets used ...
1
vote
0answers
115 views

How to tell Vim to extend the background color to the whole screen?

I have an issue with the Vim color schemes: The background color does not fill the whole screen. For example, in the "blue" color scheme the whole screen should turn blue. Instead, the blue background ...
19
votes
12answers
1k views

What language for starting on Linux?

I am about to begin a 4-year information security degree at Purdue. The degree does not call for any programming courses. So the only time I will be able to take one is the occasional elective. So ...
3
votes
1answer
90 views

Command output in vi editor

I open a text file using vi editor in linux and want to insert date command output without exiting vi editor. What is the trick? Thanks
0
votes
2answers
380 views

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 ...
1
vote
1answer
88 views

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 ...
1
vote
1answer
139 views

Telnet hangs with vim [closed]

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 ...
0
votes
2answers
190 views

Vim how to change the cursor from char block to pre pipe/line

Not sure what the terminology is for it but on Vim the 'cursor' is always like an insert/replace cursor instead of the blinking line cursor I'm used to in other gui editors. Is there any way to change ...
1
vote
2answers
105 views

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 ...
1
vote
1answer
117 views

When using vim with screen the keys ctrl + right and ctrl + left don't work

In the last days i became very addicted of using the combination terminator (in full screen) + screen + vim. But i'm having problems with the ctrl + right and ctrl + left key mappings, they are ...
1
vote
4answers
187 views

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 ...
0
votes
1answer
40 views

Save buffer on exit from insert mode in Vim

Is there any way to map <Esc> key to save buffer after exit from insert mode?
1
vote
2answers
277 views

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: ...
1
vote
2answers
104 views

Scrolling? ~ Vim ex mode

Feel free to point me to the appropriate documentation for this. When in ex mode ( Q ) and entering numerous commands, the file scrolls up to where you can't see what you're working on. Are there ...
2
votes
2answers
203 views

How to I use Vim's increment (Control-a) when in a screen session?

Is there a way to re-map Control-a in screen to Alt-a or something else, so I can use Control-A in Vim normally (increments the number under the cursor)?
0
votes
2answers
254 views

How to find malformed - corrupted - dos - BOMByte Files in Linux

I've several problems maintaining large production servers, in which some developers drop files from Windows environments, sometime with BOM-bytes (We use UTF8, and no need for that), causing lots of ...
0
votes
1answer
223 views

How to disable ctrl-v in Vim?

In /etc/vimrc, how do I disable the ctrl-v feature. I.e, disable visual block
1
vote
1answer
133 views

Vim Pattern replace

<created> pat@c.com </created> I want to replace the above with but the username may vary i.e,pat@c.com ,harry@c.com... <created> tom@c.com </created> What is ...
2
votes
2answers
106 views

Languages in vim editor

How to insert copy-paste a hindi language word from web pages to vim editor.When i do it now it says "..... . ....." What is the settings that has to be changed in vim editor to do this Thanks..
2
votes
3answers
338 views

Vim - Trigger action\script on save\write?

This might be better for super user, but I figure as a tool of the trade it might be a better topic for here. I find often when editing in vim that I exit out, run some script that I am testing, and ...
1
vote
4answers
276 views

Is linux VI editor different from vim editor

I want to use one editor which is available across all the system. Someone told me VIM is best and i tried on ubuntu and VIM was not there but vi is there. SO which one should i use
2
votes
3answers
152 views

Most elegant way of ssh copying a file to a remote host, then executing it

I find myself performing this REPL-like action quite often: vim foo.sh scp foo.sh host:/tmp/foo.sh ssh host /tmp/foo.sh # realizing it wasn't quite right vim foo.sh scp foo.sh host:/tmp/foo.sh ssh ...
0
votes
2answers
367 views

Vim: How can I :cd to an sftp directory?

I'm currently an emacs user, but thought I would come back and take another look at Vim for fun. My client machine is Ubuntu, and I frequently work on other ubuntu servers within my network, emacs ...
4
votes
2answers
367 views

How do I keep 10 lines visible when scrolling up to EOF with CRTL-F?

I am used to using vi, not vim. What I find annoying in vim is that when you are scrolling with CTRL-F and reach EOF, vim scrolls down to the very last line and put this line on the top of your ...
1
vote
1answer
358 views

Problems with vim/locale as non-root user on Solaris

I do some work on a Solaris 10 machine, and my .vimrc is set up to show unicode characters for tabs and line endings: set listchars=tab:▸\ ,eol:¬ This works out of the box on my OS X machine. On ...
1
vote
3answers
70 views

Change Vim configurable based on filetype

Is there a way where I can set vim to configure itself based on the filetype? So for example, text files have the equivalent of :set spell :syntax off Where a C source file has :syntax on ...
6
votes
6answers
401 views

emacs for sys admins

Are you a sys admin that uses emacs? What tools/plugins do you find essential? In my organization the programmers tend to use emacs whereas the sys admins gravitate towards vim. Since we have 4:1 ...
0
votes
2answers
92 views

Display a summary of the scope context with vim

Let say I am working on a code which look like this, in C for example. function foo() { int a; int b; 15 kLoC for (int i = 0; i < n; i++) { 15 kLoC if (bar) { while (true) { ...
0
votes
2answers
185 views

re: UTF-8, PHP and XML Mysql

This is relating to http://stackoverflow.com/questions/1791082/utf-8-php-and-xml-mysql, which I am still trying to get my head around. I Have a couple of separate questions that will hopefully help ...
5
votes
6answers
948 views

Split vim window

How do I have vim and a console in the same window? For example, I am splitting up the vim window into multiple windows (vertically or horizontally). What I want is to have the code window on the left ...
3
votes
4answers
2k views

How to make a global ~/.vimrc?

Right now, I make everyone do ~/.vimrc and put their settings there. How can I make a global, default .vimrc for new users? Edit: I am using CentOS
0
votes
2answers
663 views

Auto Recovery and Deletion of VIM .swp Files

So, if I have a screen session with maybe 15 files open, in about 10 instances of VIM, and my landlord yanks my power ... Can I load everything up and recover the swp files, and delete them after in ...
0
votes
3answers
136 views

Managing different versions of VIM in unix

At my company, there are several linux boxes, each with various versions of VIM installed. On one box is version 7, the other is Tiny VIM 6. Tiny VIM doesn't have color and it annoys the heck out of ...
1
vote
3answers
2k views

Vim keyboard remap on Snow Leopard (MacOs 10.6)

I want to have my external keyboard's HOME, END, PAGEDOWN and PAGEUP Working on Leopard's Terminal. So that I changed in Terminal > File > Preferences: Home: \033[H End: \033[F PageUp: \033[5~ ...
6
votes
1answer
678 views

How to tell if I'm in MacVim in .vimrc

In my .vimrc, I want to check if I'm in MacVim vs. regular vim so I can optionally set some MacVim-specific settings, which should not be applied to regular vim. How do I do this?
1
vote
5answers
553 views

Vim Configuration for Server-Side Editing

I always use Vim on our servers (mostly Ubuntu based) and I always lack a good configuration that suits vim over SSH without too much frills. I'd like to gather as much as possible configuration ...
2
votes
3answers
2k views

VI Editor on Ubuntu using VIM Short Cuts?

I installed Ubuntu and I tried to use the terminal's vi editor. The editor is using a different set of short cut keys that I'm not familiar with. Someone told me it's probably using the VIM short ...
4
votes
3answers
788 views

Windows Powershell Vim Keybindings

Is there a way to get vim keybindings in powershell as you would in bash or zsh with a command like set -o vi
1
vote
3answers
201 views

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

I see 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 such that I can ...

1 2