Vimrc per sviluppatori Drupal

Tagged:

Come usare il proprio editor preferito con il miglior framework? Salvare il file come ~/.vimrc-drupal e mettere bel alias nel ~/.bashrc per usare questa configurazione unicamente con Drupal.

File ~/.bashrc || ~/.bash_profile

alias vid="vim -u ~/.vimrc-drupal"

File ~/.vimrc-drupal

syntax on
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent

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

" Highlight chars that go over the 80-column limit
:highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white
:match OverLength '\%81v.*'

" Highlight redundant whitespaces and tabs.
highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$\| \+\ze\t\|\t/

let php_sql_query = 1
let php_baselib = 1
let php_htmlInStrings = 1
let php_folding = 1
AllegatoDimensione
vimrc-drupal741 byte

Commenti

Opzioni visualizzazione commenti

Seleziona il tuo modo preferito per visualizzare i commenti e premi "Salva impostazioni" per attivare i cambiamenti.
ritratto di Alessio

Ci fosse una volta........

Ci fosse una volta che capisco questi tuoi interessanti post... :oP
E dire che probabilmente potrebbero anche essermi utili! :oD

Invia nuovo commento

Il contenuto di questo campo è privato e non verrà mostrato pubblicamente.
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Tag HTML permessi: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Linee e paragrafi vanno a capo automaticamente.

Maggiori informazioni sulle opzioni di formattazione.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
  _____  _  __   ___    _____              
|__ / | |/ / / _ \ |___ | _ __ ____
/ / | ' / | | | | / / | '__| |_ /
/ /_ | . \ | |_| | / / | | / /
/____| |_|\_\ \__\_\ /_/ |_| /___|
Enter the code depicted in ASCII art style.