LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-14-2008, 03:18 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
vim slow editing php files in ubuntu


I am a gentoo person, and I have never had a problem with this before. However at work I need to use a company laptop that has ubuntu.

Vim is my editor of choice. When editing perl or other files it runs fine. However when I edit php files it is very slow, scrolling down alone looks jittery and can take a while, even moving the cursor lags!

I am using the same .vimrc files I used on the gentoo system that had no problems. I will attach them below.

I did have some initial problems getting php syntax highlighting, I do not recall how I solved them.

user .vimrc file:
Code:
:set number
:set incsearch
:set hidden
:set tabstop=4
:set expandtab
:set list
:set listchars=tab:>.
:map <F9> :w<cr>:! prove -v -I. -Ilib -It %<CR>
:imap <F9> <ESC>:w<cr>:! prove -v -I. -Ilib -It %<CR>
syntax on
filetype on
set exrc            " execute all found .vimrc files
" :setlocal spell spelllang=en

if has("autocmd")
  " Drupal *.module files.      
  augroup module                
    autocmd BufRead *.module set filetype=php
  augroup END                   
endif
.vimrc file in the directory I am working on.
Code:
:set tabstop=2
:set shiftwidth=2
:set autoindent
:set smartindent

if has("autocmd")
  " Drupal *.module files.
  augroup module
    autocmd BufRead *.module set filetype=php
    autocmd BufRead *.install set filetype=php
    autocmd BufRead *.t set filetype=php
    autocmd BufRead *.info set filetype=php
  augroup END
endif

Last edited by exodist; 05-14-2008 at 03:21 PM.
 
Old 05-15-2008, 04:05 PM   #2
Gryyphyn
Member
 
Registered: Dec 2006
Location: Ogden, UT (Go OALUG!)
Distribution: OpenSuSE 10.1
Posts: 61

Rep: Reputation: 15
Quote:
Originally Posted by exodist View Post
I am a gentoo person, and I have never had a problem with this before. However at work I need to use a company laptop that has ubuntu.

Vim is my editor of choice. When editing perl or other files it runs fine. However when I edit php files it is very slow, scrolling down alone looks jittery and can take a while, even moving the cursor lags!

I am using the same .vimrc files I used on the gentoo system that had no problems. I will attach them below.

I did have some initial problems getting php syntax highlighting, I do not recall how I solved them.
I won't claim to be an expert on .vimrc files, but one of the most basic things I would check is that all of the packages for php and vim are updated. If vim isn't higlighting selected areas (I assume you're speaking of open/close symbols such as {}, "" and ()) it may be that the files aren't being interpereted correctly. That's where I'd start, emerge -U ***. Hope that's some kind of helpful.

Gryyphyn, out.
 
Old 05-15-2008, 05:49 PM   #3
bjagee
Member
 
Registered: Jan 2007
Location: Portland, OR
Distribution: Ubuntu Jaunty / Fedora
Posts: 39

Rep: Reputation: 15
It seems that you are missing a line that is in all of my vimrc s and the comment would suggest that it is important. Hope this helps.

Code:
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
If not, try adding:
Code:
:set compatible
 
Old 05-17-2008, 01:43 PM   #4
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
This won't help but... I moved to Emacs recently and I'm happy.
 
Old 05-17-2008, 01:59 PM   #5
Gryyphyn
Member
 
Registered: Dec 2006
Location: Ogden, UT (Go OALUG!)
Distribution: OpenSuSE 10.1
Posts: 61

Rep: Reputation: 15
Talking

Quote:
Originally Posted by Worksman View Post
This won't help but... I moved to Emacs recently and I'm happy.
EMACS isn't a text editor, it's an operating system! ^_^
 
Old 05-17-2008, 02:18 PM   #6
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
There's also MicroEMACS

Quote:
Originally Posted by Gryyphyn View Post
EMACS isn't a text editor, it's an operating system! ^_^
If that's what it takes!

(there's also MicroEMACS)
 
  


Reply

Tags
vim, vimrc


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
Editing remote files (on FTP) with VIM does not works depi Linux - Software 3 09-04-2006 07:23 AM
vim and vi editing question penguin_powered Programming 5 07-24-2005 05:43 PM
VIM: editing files via ftp robertmarkbram Linux - Software 2 10-17-2004 01:41 AM
Vim editing newbie needs help! andym Linux - Software 1 04-16-2003 03:59 AM
editing two files in vim schatoor Linux - Software 2 12-28-2002 08:56 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration