Skip to content
David Persson edited this page Jul 23, 2011 · 2 revisions

This page provides information for integrating Lithium with your favourite editor. This list of editors is ordered by pref.. alphabetically.

Komodo

Lithium Color Scheme for Komodo

PhpStorm

PhpStorm settings, instructions and information can be found at in the lithium_phpstorm project.

TextMate

Full integration with TextMate is provided through lithium_textmate.

VIM

As per current published Lithium code standards. Here are some useful lines to add to ~/.vimrc to ensure compliance:

" Lithium configuration
"-- Encoding
set fileencodings=utf-8

"-- Indentation
set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set noexpandtab

"-- Show whitespace chars
set listchars=tab:?\ ,trail:?,extends:>,precedes:<
set list

"-- Highlight long lines (soft limit: 80, hard limit: 100)
:au BufWinEnter *.php,*.py let w:m1=matchadd('Search', '\%<101v.\%>80v', -1)
:au BufWinEnter *.php,*.py let w:m2=matchadd('ErrorMsg', '\%>100v.\+', -1)

"-- Remove trailing whitespaces from lines
autocmd FileType php autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")'))

"-- Press F5 to Clean Current Buffer
"-- (i.e., 2-spaces become tabs, end-line whitespace trimmed)
nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<CR>:%s/  /\t/eg<Bar>:let @/=_s<Bar>:nohl<CR>

"-- No eols
:autocmd BufWritePre *.php setlocal binary
:autocmd BufWritePre *.php setlocal noeol
:autocmd BufWritePost *.php setlocal nobinary

NOTICE: CakeMate is a 2-in-1 CakePHP shell and VIM plugin. Would be nice if someone were interested in porting to Lithium. (http://thechaw.com/cakemate/source/vendors/vim/plugins/cakephp.vim#highlight)

Clone this wiki locally