LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-22-2004, 01:29 AM   #1
true_atlantis
Member
 
Registered: Oct 2003
Distribution: fedora cor 5 x86_64
Posts: 639

Rep: Reputation: 30
vi help


how can i make my vi indent when there is a {

like if im creating a method, and after i type { i press enter, i want it to auto indent... how do i do that??
 
Old 01-22-2004, 02:13 AM   #2
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
is it vi or vim?
note following is from .vimrc file:


augroup cprog
" Remove all cprog autocommands
au!

" When starting to edit a file:
" For *.c and *.h files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd BufRead * set formatoptions=tcql nocindent comments&
autocmd BufRead *.c,*.cc,*.h set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
 
  


Reply



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



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:32 PM.

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