Last commit

This commit is contained in:
Andrea Mistrali 2012-08-29 10:05:04 +00:00
parent 49b00e89ef
commit 6cfe0a8b83
5 changed files with 8 additions and 110 deletions

View File

@ -2,6 +2,8 @@
" GVIMRC - for GUI Vim Version (gvim, MacVim)
"
" $Id$
"
set guifont=Monaco:h13
set anti
set lines=50
@ -23,6 +25,7 @@ if &background == "dark"
set transparency=4
endif
" colorscheme railscasts
" colorscheme zenburn
colorscheme freya
" colorscheme southwest-fog

View File

@ -1,108 +0,0 @@
"
" File: open_terminal.vim
"
" Requires:
" platform Terminal File manager
" Mac Terminal.app Finder
" (with Applescript)
" Gnome gnome-terminal nautilus
" KDE konsole konqueror
" Windows cmd explorer
" (with start)
" cygwin bash explorer
"
" Example:
" nnoremap <silent> <F9> :OpenTerminal<CR>
" nnoremap <silent> <F10> :OpenFilemanager<CR><CR>
"
" Commands:
" OpenTerminal
" OpenFilemanager
"
" OpenTerminal {{{1
function! s:open_terminal()
let l:current_dir = getcwd()
execute("chdir " . escape(expand("%:p:h"), " \"'"))
if has("mac")
let l:cmd = "
\ tell application 'System Events' \n
\ set is_term_running to exists application process '$Terminal' \n
\ end tell \n
\
\ set cmd to 'cd $current_path' \n
\ tell application '$Terminal' \n
\ activate \n
\ if is_term_running is true then \n
\ do script with command cmd \n
\ else \n
\ do script with command cmd in window 1 \n
\ end if \n
\ end tell \n
\ "
let l:cmd = substitute(l:cmd, "'", '\\"', 'g')
let l:cmd = substitute( l:cmd, "$Terminal", "Terminal", "g" )
let l:cmd = substitute( l:cmd, "$current_path", "'" . expand("%:p:h") . "'" , "g")
call system('osascript -e " ' . l:cmd . '"')
elseif has("gui_gnome") && executable("gnome-terminal")
call system("gnome-terminal &")
elseif has("gui_gnome") && executable("konsole")
call system("konsole &")
elseif has("gui_win32")
try
call system("start cmd")
catch /E484:/
echo "Ignore E484 error in Windows platform"
endtry
elseif executable("bash")
!bash
elseif has("win32")
stop
endif
execute("chdir " . escape(l:current_dir, " \"'"))
endfunction
command! -nargs=0 -bar OpenTerminal call s:open_terminal()
"}}}1
" OpenFilemanager {{{1
function! s:open_filemanager()
let l:cmd = "$cmd ."
let l:current_dir = getcwd()
execute("chdir " . escape(expand("%:p:h"), " \"'"))
if has("mac")
call system("open .")
elseif has("gui_gnome") && executable("nautilus")
call system("nautilus .")
elseif has("gui_gnome") && executable("konqueror")
call system("konqueror .")
elseif has("gui_win32") || has("win32")
call system("explorer .")
elseif executable("bash")
!bash
endif
execute("chdir " . escape(l:current_dir, " \"'"))
endfunction
command! -nargs=0 -bar OpenFilemanager call s:open_filemanager()
" }}}1
" About file info {{{1
"=============================================================================
" Copyright (c) 2009 by neocoin
" File: open_terminal.vim
" Author: Sangmin Ryu (neocoin@gmail.com)
" Date: Tue Dec 22 13:33:32 PST 2009
" License: The MIT License
" Version: 0.1
"=============================================================================
" }}}1
" vim: set fdm=marker:

View File

@ -29,6 +29,7 @@ set expandtab
set softtabstop=4
" set autoindent
" set smartindent
" Highlightinh in python:
let python_highlight_numbers = 1
let python_highlight_builtins = 1
@ -62,7 +63,8 @@ set fileformats=unix,mac,dos
set fileformat=unix
set mouse=a
set printfont=Monaco:h14
colorscheme wombat256
" colorscheme wombat256
colorscheme railscasts
" """""""""
" User Info
@ -101,7 +103,8 @@ set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.i
" """""""""""""""
" TagLIST support
" """""""""""""""
let Tlist_Ctags_Cmd="/opt/local/bin/ctags"
" Defined in vimrc.local
" let Tlist_Ctags_Cmd="/opt/local/bin/ctags"
let Tlist_Exit_OnlyWindow = 1
let Tlist_File_Fold_Auto_Close = 1
"let Tlist_Use_SingleClick = 0 "Do not use yet