对于Vim退伍军人,您会给出哪个.emacs文件?

对于Vim退伍军人,您会给出哪个.emacs文件?,emacs,vim,Emacs,Vim,我使用Vim进行编码。 我也想学Emacs 我想将my.vimrc中的以下定制导出到my.emacs中 My.vimrc let Tlist_Auto_Open = 1 " http://stackoverflow.com/questions/165231/vim-dvorak-keybindings-rebinding " Dvorak it! no d h no h j no t k no n l no s : no S : no j d no J D no l n no L N " Ad

我使用Vim进行编码。 我也想学Emacs

我想将my.vimrc中的以下定制导出到my.emacs中

My.vimrc

let Tlist_Auto_Open = 1

" http://stackoverflow.com/questions/165231/vim-dvorak-keybindings-rebinding
" Dvorak it!
no d h
no h j
no t k
no n l
no s :
no S :
no j d
no J D
no l n
no L N
" Added benefits
no - $
no _ ^
no N 
no ; z
no T L
no P P
no p p

let Tex_ViewRuleComplete_pdf = '/usr/bin/open -a Skim $*.pdf' 

set history=1000

set smartindent
set autoindent
set tabstop=4
set expandtab
set shiftwidth=3                                                                                            
set softtabstop=4
set number
set hlsearch
syntax on
set cursorline
highlight CursorLine guibg=#400000
set ruler
set textwidth=78
set foldcolumn=5

" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on 
filetype indent on

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


" http://ubuntuforums.org/showthread.php?t=74889
set foldmethod=manual "folds by indentation, manual, indent
set nocompatible                "Use Vim extensions
set backspace=indent,eol,start  "More powerful backspacing
set nobackup                    "No backup file
set showmode                    "Tell when in insert mode
set showmatch                   "Show matching () {} etc
set hlsearch                    "Highlight what is searched for
set incsearch                   "Highlight as you type

if &t_Co > 2
  syntax on
endif

set bg=dark
hi clear
if exists("syntax_on")
  syntax reset
endif


"Allowable colors: red, yellow, green, blue, magenta,
"                  cyan, gray, black, gray
hi Normal ctermfg=gray ctermbg=none
hi ErrorMsg ctermfg=gray ctermbg=lightblue
hi Visual ctermfg=lightblue ctermbg=fg cterm=reverse
hi VisualNOS ctermfg=lightblue ctermbg=fg cterm=reverse,underline
hi Todo ctermfg=red ctermbg=darkblue
hi Search ctermfg=gray ctermbg=darkblue
hi IncSearch ctermfg=darkblue ctermbg=gray
hi SpecialKey ctermfg=darkcyan
hi Directory ctermfg=cyan
hi Title ctermfg=magenta cterm=bold
hi WarningMsg ctermfg=red
hi WildMenu ctermfg=yellow ctermbg=black cterm=none
hi ModeMsg ctermfg=lightblue
hi MoreMsg ctermfg=darkgreen ctermfg=darkgreen
hi Question ctermfg=green cterm=none
hi NonText ctermfg=darkblue
hi StatusLine ctermfg=blue ctermbg=gray cterm=none
hi StatusLineNC ctermfg=black ctermbg=gray cterm=none
hi VertSplit ctermfg=black ctermbg=gray cterm=none
"hi Folded ctermfg=darkgrey ctermbg=black cterm=bold
"hi FoldColumn ctermfg=darkgrey ctermbg=black cterm=bold
hi LineNr ctermfg=gray cterm=none
hi DiffAdd ctermbg=darkblue cterm=none
hi DiffChange ctermbg=magenta cterm=none
hi DiffDelete ctermfg=blue ctermbg=cyan
hi DiffText cterm=bold ctermbg=red
hi Cursor ctermbg=brown
hi lCursor ctermbg=darkgreen

hi Comment ctermfg=lightgreen cterm=none
hi Constant ctermfg=cyan cterm=none
hi Identifier ctermfg=gray cterm=none
hi Statement ctermfg=red cterm=none
hi PreProc ctermfg=yellow cterm=bold
hi Type ctermfg=darkyellow cterm=none
hi Special ctermfg=magenta cterm=none
hi Underlined cterm=underline
hi Ignore cterm=none

你的.emacs中有什么可以让我拥有上面的一些功能?

试试这些,然后进行实验

除此之外,还有一个不错的链接:

这也很有帮助

我的天,你真的在你的.vim里把键盘重新映射到了德沃夏克

好的,下面是一些其他的:

设置智能缩进
设置自动缩进

在编程模式中没有自动控制功能。对于文本模式,请查看“自动缩进模式”和“填充自适应”

设置tabstop=4
设置shiftwidth=3
设置softtabstop=4

(shiftwidth没有简单的等价物;EMACS使用更智能的缩进算法

设置扩展选项卡

设定数

有一种方法可以得到编号的行,但我从来没有使用过它,也不记得它

语法

设置光标线

有一堆光标设置,通过M-x查看光标


其他一些东西也可以使用,这些是我马上就知道的。

对于每个缓冲区,您可以使用
(linum模式1)
(全局linum模式1)
获得编号行。此功能目前仅在CVS Emacs中提供。请参阅

要在Emacs中打开PDF文档,有
文档查看模式
。有关更多说明,请参阅


无论如何,如果你开始使用Emacs初学者工具包学习Emacs,然后找到你真正缺少的东西,那就更好了。Emacs world不同于Vi。你可以随时浏览堆栈溢出,看看你的问题是否已经得到了回答。

你绝对应该尝试邪恶模式。Emacs的最佳vim模拟器:

页面已关闭(500内部服务器错误)。此操作:
(setq c-basic-offset 4) ; indents 4 chars
(setq tab-width 4)          ; and 4 char wide for TAB
(setq indent-tabs-mode nil) ; And force use of spaces
(setq indent-tabs-mode nil)
 (turn-on-font-lock)