Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-27-2009, 11:40 PM   #1
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
Vim commands for multiple windows


If I open 10 files in vim simultaneously with or without -o option, I have to do :set commands individually in each window.

How can I run ":set xx" for multiple windows simultaneously open in gvim?

Old 08-28-2009, 01:01 AM   #2
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos
Posts: 301

Rep: Reputation: 68
One way is to use the .exrc file in your home directory. That can contain set commands for vi. These will then be global values for all of your vi sessions. for example, my .exrc file contains the three lines :-

syntax off
set nohlsearch
set ignorecase


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vim foldmarker with multiple options sadarax Linux - Software 0 12-22-2006 02:09 PM
LXer: Vim tips: Working with external commands LXer Syndicated Linux News 0 10-25-2006 03:21 PM
vim: Piping through multiple external commands tragos Linux - Software 2 03-19-2005 01:09 PM
multiple files in VIM james.farrow Linux - Newbie 3 07-09-2004 05:46 AM
vim commands in perl JohanLingen Programming 5 01-08-2003 04:43 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration