vim-spacemacs


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2016-04-03
使用用户:  1
Github星:  10
插件作者:  Meitham

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'meitham/vim-spacemacs-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'meitham/vim-spacemacs-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'meitham/vim-spacemacs-today-cannot-touch'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/meitham/vim-spacemacs

Ⅳ. 文档说明

# vim-spacemacs

For those days when emacs lets you down and you have to drop back to vim. This
plugin attempts to bring spacemacs keybinding back into vim.

For best results, map your leader to <Space>

let mapleader=" "

You could also set , as your major mode leader

let maplocalleader=","

Installation

Vundle

Add this line to your .vimrc:

Plugin 'meitham/vim-spacemacs'

Then run:

:PluginInstall

Pathogen

git clone https://github.com/meitham/vim-spacemacs.git ~/.vim/bundle/vim-spacemacs

Graphical UI Toggles

Key BindingDescription
SPC t fdisplay the fill column (textwidth or 80)
SPC t h htoggle highlight of the current line (:setlocal cursorline)
SPC t h ctoggle highlight of the current column (:setlocal cursorcolumn)
SPC t ltoggle truncate lines (:setlocal wrap!)
SPC t n ntoggle line numbers (:setlocal number!)
SPC t n rtoggle relative line numbers (:setlocal relativenumber!)

Buffers manipulation key bindings

Key BindingDescription
SPC TABswitch to alternate buffer in the current window (:b #)
SPC b blist available buffers (:ls)
SPC b dkill the current buffer (:bdelete)
SPC b eerase the content of the buffer (normal ggdG)
SPC b kkill a buffer (:bdelete and write a name of number then hit enter)
SPC b Kkill all buffers except the current one (:.+,$bdelete)
SPC b Mswap windows (ctrl+w r) rotate
SPC b nswitch to next buffer (:bnext)
SPC b pswitch to previous buffer (:bprev)
SPC b Rrevert the current buffer - reload from disk (:e! %)
SPC b wtoggle read-only (:setlocal readonly!)
SPC b Ycopy whole buffer to primary clipboard (normal gg"+yG)

File manipulation key bindings

Key BindingDescription
SPC f ccopy current file to a different location (:w enter-path<cr>)
SPC f C dconvert file from unix to dos encoding (:setlocal ff=dos)
SPC f C uconvert file from dos to unix encoding (:setlocal ff=unix)
SPC f Ddelete a file and the associated buffer (:bwipeout)
SPC f fopen file in same directory as current file (:e <c-r>=expand('%:p:h') . '/')
SPC f Fopen file under cursor (normal gf)
SPC f Rrename the current file (:saveas enter-new-name<cr>)
SPC f ssave a file (:w)
SPC f Ssave all files (:bufdo w)
SPC f yshow current file absolute path (:echo expand('%:p'))
SPC f e dedit the .vimrc file (:e $MYVIMRC)
SPC f e Rreload the .vimrc file (:so $MYVIMRC)

Text manipulation key bindings

Key BindingDescription
SPC x uset the selected text to lower case (visual u)
SPC x Uset the selected text to upper case (visual U)
SPC x d wdelete trailing whitespaces (:%s/s+//g)
SPC x l ssort lines (:sort)
SPC x l uuniquify lines (:sort u)
SPC x t cswap (transpose) the current character with the next one (normal xp)
SPC x t wswap (transpose) the current word with the next one (normal dawwp)
SPC x t lswap (transpose) the current line with the next one (normal ddp)

Text alignment requires tabular plugin

Key BindingDescription
SPC x a ,align region at , (:Tab /,)
SPC x a ;align region at ; (:Tab /;)
SPC x a :align region at : (:Tab /:)
SPC x a =align region at = (:Tab /=)
SPC x a &align region at & (:Tab /&)
SPC x a ¦align region at ¦ (:Tab /)

Dependecies

This plugin can safely function on its own, but some extra features can be enabled using
3rd party plugins.

tpope/vim-commentary

spacemacs default commenting are based on this plugin, so gc on selections or objects.
alt+; as in the default comment operator in emacs is also accessible through this plugin.

tpope/vim-fugitive

git blame, git diff and git status are provided through fugitive

godlygeek/tabular

all text aligning commands are available through Tab from this plugin.

License

Copyright (c) Meitham Jamaa. Distributed under the same terms as Vim itself.
See :help license.

添加新评论