0
這是我的〜/ .vimrc試圖創建自定義函數的vim
filetype plugin indent on
syntax on
syntax enable
""" <F5> calls make
function! CallMake()
:!make
endfunction
:map <F5> :call CallMake()<CR>
:imap <F5> <C-O>:call CallMake()<CR>
""" <F6> calls run.sh
function! CallRun()
:!./run.sh
endfunction
:map <F6> :call CallRun()<CR>
:imap <F6> <C-O>:call CallRun()<CR>
""" Test
map <F7> :ls<CR>
map! <F7> :ls<CR>
""" Remapped keys
" swap ; and : in normal mode
nnoremap ; :
nnoremap : ;
" exit insert mode with jk
imap jk <Esc>
" show commands as you're typing them
set showcmd
" enable mouse
set mouse=a
" show line numbers
set number
""" Search options
set hlsearch
set ignorecase
""" tabs
set tabstop=4
set shiftwidth=4
set expandtab
colors koehler
的問題是我得到的,當我按F5,F6,F7或者是終端鍾。 有誰知道我在做什麼錯?
我使用的是默認的Ubuntu 10.10終端,而zsh作爲我的shell,如果其中之一。
這裏的目標是讓F5在當前目錄中調用make,並使F6在當前目錄中調用 ./run.sh。如果有比我更好的方式, 我也想知道。
感謝您的任何幫助:)
This Works!當我鍵入「ctrl-v」後跟F5時,我的函數被調用。如果有人知道從哪裏開始配置終端,請告訴我。 – Kevin 2011-12-20 06:38:13
哪個系統和你使用的是什麼終端? – skeept 2011-12-21 00:36:01
Ubuntu 10.10與默認終端 – Kevin 2011-12-21 03:54:47