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

Vim Pattern replace

pat@c.com I want to replace the above with but the username may vary i.e,pat@c.com ,harry@c.com... tom@c.com What is the command to replace this in vim %s/\r*\r/new string
Hulk
  • 391
  • 1
  • 6
  • 17
1
vote
4 answers

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
John
1
vote
1 answer

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 Linux as well as Solaris I get the following error…
Lyle
  • 111
  • 4
1
vote
3 answers

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 :smartindent on Thanks for any help.
devin
  • 1,246
  • 3
  • 20
  • 27
1
vote
2 answers

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) { **cursor is here** } } } } I…
Jérôme
  • 181
  • 2
  • 7
1
vote
0 answers

Can't find font as regular user

As a root, I can run gvim with my font selected as 'Ubuntu mono 14' and have everything work correctly. But as a regular user using the exact same config file selecting the exact same font, I get this: (gvim:10498): Pango-WARNING **: 20:39:24.946:…
ivanlan
  • 111
  • 3
1
vote
4 answers

What $TERM value can you use on a Nokia N810 so Vim's key mappings work properly?

I'm connected to a Nokia N810 Internet Tablet through ssh. The default $TERM value is 'xterm' which causes all sorts of key bindings messes in Vim. Specifically the arrow keys, and home/end keys print out characters or change the case when not in…
Neil
  • 2,425
  • 8
  • 36
  • 45
1
vote
1 answer

When root opens crontab Vim is used although Nano is set as the default editor. Why might this be?

Environment: CentOS 8 Question: When I enter sudo crontab -e it opens in Vim. However Nano is set as the default editor and for every other type of file it is used as expected. Why might this be? Is there a way around this? Background: I followed…
myNewAccount
  • 569
  • 1
  • 6
  • 19
0
votes
2 answers

Debian 10 Unable to install vim, terminator

Today I noticed that Debian 10 is released, however, I am unable to install terminator and vim as the packages are not found. sources.list was set to cdrom, but I changed it to network http://deb.debian.org/debian/ and commented cdrom. Here is my…
elekgeek
  • 51
  • 5
  • 14
0
votes
1 answer

How to instal vim using salt stack?

I have salt-stack maser and minion servers which running on centos7. I want to install vim package in minion server. For that I have created srv directory and vim.sls file under etc. My vim.sls file looks like this. vim: pkg: -…
Janith
  • 223
  • 2
  • 4
  • 8
0
votes
2 answers

re: UTF-8, PHP and XML Mysql

This is related to https://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 me understand how to resolve the issues I am…
icelizard
  • 732
  • 3
  • 10
  • 20
0
votes
2 answers

Can't open file /usr/share/vim/vim73/syntax/syntax.vim

Whenever I use vim command, I get this error: Error detected while processing /Users/boss/.vimrc: line 6: E484: Can't open file /usr/share/vim/vim73/syntax/syntax.vim Press ENTER or type command to continue Whenever I try to do an ls…
Cuong Ngo
  • 1
  • 1
0
votes
2 answers

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 an automated way. More importantly, is this not…
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
0
votes
2 answers

Installing blowfish2 for use in VIM on CentOS 7

I'm moving from a Debian-based distro to CentOS 7. I have files encrypted with blowfish that I edit transparently in VIM with this setting in ~/.vimrc: :set cryptmethod=blowfish2 This is the error that I receive: E474: Invalid argument:…
dotancohen
  • 2,590
  • 2
  • 25
  • 39
0
votes
3 answers

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 me. I have root access but I am very new to bash…
Gary H