通过光标位置粘贴缩进

时间:2018-06-01 12:26:08

标签: emacs cursor clipboard

如何使emacs粘贴剪贴板内容

List = ['a','a','ab','ab','ab']

count = 1
current = List[0]
archive = [[count,current]]
for item in List:
    if current == item :
        count = count+1
        current = item 
        archive.append([count,item ])

    else:
        count = 0
        current = item 

print archive

进入代码

call_in_the_middle('arg')
call_something()
call_else()

立即得到结果:

function my function(a,b,c) {
  hello('world')
  |               <---------cursor position
  bye('world)
}

但不是

function my function(a,b,c) {
  hello('world')
  call_in_the_middle('arg')
  call_something()
  call_else()    
  bye('world)
}

UPD这不是编辑模式格式化 - 我想在任何模式下粘贴光标左侧位置移动的文本

0 个答案:

没有答案