:set columns=80 not working

Asked by mohan43u

Currently I installed the following packages,

vim-gnome
vim
vim-full
vim-tiny
vim-doc
vim-gui-common
vim-common
vim-runtime

But still I'm not able to set columns width to 80 using the below command,

:set columns=80
:set columns
     columns=157

Its till going to 157, what happend to vi? Am I installed the full vi? why its not
working properly? what the hell debian.vim doing in /etc/vim/vimrc?

runtime! debian.vim

the actual 'vi' is pointing to 'usr/bin/vim.gnome'. Before installing 'vim-full' it was pointed to '/usr/bin/vim.basic', before installing 'vim', it was pointed to ''usr/bin/vim.tiny', all the 'vim varients' failed to set the columns to my preferred width(80).

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu vim Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #370179.

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) said :
#1

Could you try the same command using gvim? This should work.
But I think what you really want is the following: set textwidth=80
This will break the line after 80 characters.

Revision history for this message
mohan43u (mohan43u) said :
#2

:set columns=80 in gvim is working. But :set textwidth=80 in terminal vi still not working.

Revision history for this message
mohan43u (mohan43u) said :
#3

I'm currently using the following workaround (http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns), this will make any characters going beyond 80th column to appear in red.

~/.vimrc:

" Setting color highlighting for column=80
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.*/

But its a simple setting in previous 'vi' to achieve what I wanted..

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) said :
#4

As I see from your screenshot, you entered a long line without whitespace. When you set textwidth=80 vim will break after 80 characters on the first white space. So try to enter a white space and vim should break the line.

Revision history for this message
mohan43u (mohan43u) said :
#5

'textwidth' setting is working... Thanks for the kind help...

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) said :
#6

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs.

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.