Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Unix and Linux reviews > Editors > [vim] cant turn off indent




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [vim] cant turn off indent  
znndrp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-05 12:45 PM

Hi all,

I use gvim on windows and i'm trying to write something like this:

-------8<-------------------
<html>
<head>
------------>8--------------

but everytime i press [ENTER] after '<html>' vim goes to the next line
and indents 2 tabs. I don't want vim to do that  I've tried setting
noautoindent
nosmartindent
nocindent
nopreserveindent
nocopyindent

but it keeps indenting  can somebody help me with this?

thnx,

--
* alex | http://qwoot.net/





[ Post a follow-up to this message ]



    Re: [vim] cant turn off indent  
David Trimboli


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-05 10:49 PM

znndrp wrote:
> Hi all,
>
> I use gvim on windows and i'm trying to write something like this:
>
> -------8<-------------------
> <html>
> <head>
> ------------>8--------------
>
> but everytime i press [ENTER] after '<html>' vim goes to the next line
> and indents 2 tabs. I don't want vim to do that  I've tried setting
> noautoindent
> nosmartindent
> nocindent
> nopreserveindent
> nocopyindent
>
> but it keeps indenting  can somebody help me with this?
>
> thnx,
>

The brute-force method of avoiding automatic indenting is to go into
your Vim directory and find the Indent directory. File the file that
corresponds to the file you're working on (in this case, html.vim) and
delete or rename it. This way, Vim doesn't know how to indent your html
files.

The downside is, of course, that you can't change your mind without
undoing what you just did.

David
Stardate 5223.0





[ Post a follow-up to this message ]



    Re: [vim] cant turn off indent  
znndrp


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-05 10:49 PM

On 2005-03-22, David Trimboli <trimboli@cshl.edu> wrote:
> The brute-force method of avoiding automatic indenting is to go into
> your Vim directory and find the Indent directory. File the file that
> corresponds to the file you're working on (in this case, html.vim) and
> delete or rename it. This way, Vim doesn't know how to indent your html
> files.
>
> The downside is, of course, that you can't change your mind without
> undoing what you just did.

thnx, i'll give it a try.

--
* alex | http://qwoot.net/





[ Post a follow-up to this message ]



    Re: [vim] cant turn off indent  
Preben 'Peppe' Guldberg


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-27-05 12:45 PM

znndrp wrote:

> but everytime i press [ENTER] after '<html>' vim goes to the next line
> and indents 2 tabs. I don't want vim to do that  I've tried setting
> noautoindent
> nosmartindent
> nocindent
> nopreserveindent
> nocopyindent

> but it keeps indenting  can somebody help me with this?

I'm afraid you missed the 'indentexpr' option in the list above.
It is frequently used by indent scripts.

Peppe   [wondering who uses 'copyindent' and 'preserveindent']
--
se nocp cpo=BceFsx!$ hid bs=2 ls=2 hls ic " P. Guldberg /bin/vi@wielders.org
se scs ai isf-== fdo-=block cino=t0,:0 hi=100 ru so=4 noea lz|if has('unix')
se sh=/bin/sh|en|syn on|filetype plugin indent on|ono S V/\n^-- $\\|\%$/<CR>
cno <C-A> <C-B>|au FileType vim,mail se sw=4 sts=4 et|let&tw=72+6*(&ft=~'v')





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:15 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

Back To The Top
Home | Usercp | Faq | Register