Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- General
- >
- vi tab/space
General
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-16-2009 03:16 PM
12-16-2009 03:16 PM
HP-UX
vi Editor
I view a text file and I copy some text lines.
Then I vi other file and try to paste the copied text lines. But it includes some tabs or spaces at the beginning of each line and the structure is TOTALLY altered. This does not happen with linux vi (just to mention another case).
how can I avoid the inclusion of this tabs/spaces at the beginning of each copied line?
vi Editor
I view a text file and I copy some text lines.
Then I vi other file and try to paste the copied text lines. But it includes some tabs or spaces at the beginning of each line and the structure is TOTALLY altered. This does not happen with linux vi (just to mention another case).
how can I avoid the inclusion of this tabs/spaces at the beginning of each copied line?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-16-2009 03:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-16-2009 08:24 PM
12-16-2009 08:24 PM
Re: vi tab/space
It's possible your vi is running in 'autoindent' mode, which will automatically intent new lines to match the previous line. This is very useful for interactive editing, but causes problems for copy+paste.
Before pasting, try running this in the destination vi: ":set noai" (without the quotes).
autoindent seems to be the default on HP-UX vi. Linux doesn't have a standard 'vi', but on most of them, 'ai' is not the default.
BTW, if you want to read an entire file into vi, you don't need to use copy/paste, you can simply use ":r /path/to/file". This also avoids other copy+paste issues, like tabs being converted to spaces.
Before pasting, try running this in the destination vi: ":set noai" (without the quotes).
autoindent seems to be the default on HP-UX vi. Linux doesn't have a standard 'vi', but on most of them, 'ai' is not the default.
BTW, if you want to read an entire file into vi, you don't need to use copy/paste, you can simply use ":r /path/to/file". This also avoids other copy+paste issues, like tabs being converted to spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-18-2009 10:33 AM
12-18-2009 10:33 AM
Re: vi tab/space
BINGO River!
The ":set noai" solved my problem.
THANK YOU!
The ":set noai" solved my problem.
THANK YOU!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP