分页: 1 / 1

除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 22:29
oldfeel
最近学习html5经常要敲各种标签引号,用gedit编辑没有光标快捷键(上下左右/行首/行尾)感觉甚是难受。用eclipse写html又很卡,所以想换一种编辑器了。请大神们指引有没有什么编辑器可以自定义光标快捷键,像这个一样http://www.oldfeel.cn/?p=479

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 22:58
lilydjwg
vim, emacs.

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 22:59
lilydjwg
PS: 这么简单的键绑定 GTK 2 也能做到。
PPS: 新版的 GTK 3 目前还做不到。

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:06
oldfeel
lilydjwg 写了:vim, emacs.
哥~vim不能在编辑状态下定义光标快捷键,emacs的插件安装太复杂,小菜连个格式化代码都装不好,有木有其他的了?

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:07
oldfeel
lilydjwg 写了:PS: 这么简单的键绑定 GTK 2 也能做到。
PPS: 新版的 GTK 3 目前还做不到。
具体怎么操作啊??

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:07
qute
Emacs无误

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:13
lilydjwg
oldfeel 写了:
lilydjwg 写了:vim, emacs.
哥~vim不能在编辑状态下定义光标快捷键,emacs的插件安装太复杂,小菜连个格式化代码都装不好,有木有其他的了?
谁说不能?

代码: 全选

  noremap! <C-B> <Left>
  noremap! <C-F> <Right>
  noremap! <C-A> <Home>
  inoremap <C-E> <End>
  inoremap <C-P> <Up>
  inoremap <C-N> <Down>
  noremap! <M-b> <S-Left>
  noremap! <M-f> <S-Right>

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:14
oldfeel
lilydjwg 写了:
oldfeel 写了:
lilydjwg 写了:vim, emacs.
哥~vim不能在编辑状态下定义光标快捷键,emacs的插件安装太复杂,小菜连个格式化代码都装不好,有木有其他的了?
谁说不能?

代码: 全选

  noremap! <C-B> <Left>
  noremap! <C-F> <Right>
  noremap! <C-A> <Home>
  inoremap <C-E> <End>
  inoremap <C-P> <Up>
  inoremap <C-N> <Down>
  noremap! <M-b> <S-Left>
  noremap! <M-f> <S-Right>
:em05 谢谢!!!小看vim了,以后就用这个了。。。

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:15
lilydjwg
oldfeel 写了:
lilydjwg 写了:PS: 这么简单的键绑定 GTK 2 也能做到。
PPS: 新版的 GTK 3 目前还做不到。
具体怎么操作啊??

代码: 全选

#
# Bindings for GtkTextView and GtkEntry
#
binding "gtk-emacs-text-entry" {
  bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
  bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
  bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
  bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }

  bind "<alt>b" { "move-cursor" (words, -1, 0) }
  bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
  bind "<alt>f" { "move-cursor" (words, 1, 0) }
  bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }

  bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
  bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
  bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
  bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }

  bind "<ctrl>y" { "paste-clipboard" () }

  bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
  bind "<alt>h" { "delete-from-cursor" (chars, 1) }
  bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
  bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }

  bind "<ctrl>u" {
     "delete-from-cursor" (paragraph-ends, -1)
  }
  bind "<ctrl>h" { "delete-from-cursor" (chars, -1) }
  bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) }
}

#
# Bindings for GtkTextView
#
binding "gtk-emacs-text-view"
{
  bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
  bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
  bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
  bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
}

#
# Bindings for GtkTreeView
#
binding "gtk-emacs-tree-view"
{
  bind "<ctrl>n" { "move-cursor" (logical-positions, 1) }
  bind "<ctrl>p" { "move-cursor" (logical-positions, -1) }
}

#
# Bindings for menus
#
binding "gtk-emacs-menu"
{
  bind "<ctrl>n" { "move-current" (next) }
  bind "<ctrl>p" { "move-current" (prev) }
  bind "<ctrl>f" { "move-current" (child) }
  bind "<ctrl>b" { "move-current" (parent) }
}

class "GtkEntry" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-view"
class "GtkTreeView" binding "gtk-emacs-tree-view"
class "GtkMenuShell" binding "gtk-emacs-menu"
加到 ~/.gtkrc-2.0 中。

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:19
lilydjwg
oldfeel 写了:
lilydjwg 写了:

代码: 全选

  noremap! <C-B> <Left>
  noremap! <C-F> <Right>
  noremap! <C-A> <Home>
  inoremap <C-E> <End>
  inoremap <C-P> <Up>
  inoremap <C-N> <Down>
  noremap! <M-b> <S-Left>
  noremap! <M-f> <S-Right>
:em05 谢谢!!!小看vim了,以后就用这个了。。。
觉得好用的话不妨试试整个配置:
https://github.com/lilydjwg/dotvim/blob ... n/bash.vim
终端下配合这个不然 Alt 组合键有问题:
https://github.com/lilydjwg/dotvim/blob ... escalt.vim

Re: 除了eclipse还有没有其他的可以自定义光标快捷键的编辑器啊?

发表于 : 2012-10-12 23:23
oldfeel
lilydjwg 写了:
oldfeel 写了:
lilydjwg 写了:

代码: 全选

  noremap! <C-B> <Left>
  noremap! <C-F> <Right>
  noremap! <C-A> <Home>
  inoremap <C-E> <End>
  inoremap <C-P> <Up>
  inoremap <C-N> <Down>
  noremap! <M-b> <S-Left>
  noremap! <M-f> <S-Right>
:em05 谢谢!!!小看vim了,以后就用这个了。。。
觉得好用的话不妨试试整个配置:
https://github.com/lilydjwg/dotvim/blob ... n/bash.vim
终端下配合这个不然 Alt 组合键有问题:
https://github.com/lilydjwg/dotvim/blob ... escalt.vim
恩,我试试。今晚又要熬夜了 :em20