Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know... how to swap the current anchor position in the editor? - #047

Ctrl+K, Ctrl+A will swap the current anchor position.  For whatever reason, when i tested our Emacs Emulations, i used this functionality all the time whenever I wrote test case code.  But i never use it in the default editor settings.  It isn't the keybinding that i have to press.  I think it is just the way the overall experience flows when in emacs.

cursor position before swap:

cursor position before swapping anchor

cursor position after swap:

cursor position after swapping anchor

Technorati tags: ,
Posted: Wednesday, September 26, 2007 3:00 AM by saraford

Comments

Peter Jeffery said:

Well blow me. I never realised that there was even an emacs key bindings config. How long has that been there ?

I've been an emacs user for 17 years and a visual studio user for 10 years and largely avoid editting in visual studio due to emacs being better in ways that I can't quite put my finger on. This will certainly ease the pain somewhat.

# September 26, 2007 7:26 AM

Chuck said:

Sara,

Just adding my vote for you to please keep these up! While some are a bit esoteric, these are very useful for any and all keyboard jockeys. Down with the mouse! Long live the keyboard! :)

-Chuck

# September 26, 2007 8:59 AM

Jason Haley said:

# September 26, 2007 10:03 AM

Richard Sim said:

Awesome... another shortcut I'd missed that'll be used many times daily. :) I've already bound it to ctrl+shift+a (I never use dual combo shortcuts for my common commands).

On the subject of Emacs emulation, why can I not use Edit.EmacsOtherWindow or Edit.EmacsSplitVertical (and other similar commands)? In the Immediate window I simply get the error "Command "blah" is not available.", and binding to a key does nothing also.

# September 26, 2007 11:59 AM

Martin Brice said:

HOLY CRAP!  I was looking for this exacly last week!  Thank you!

# September 27, 2007 9:40 AM

Jay R. Wren said:

I'd like to echo Richards question.

EmacsOtherWindow doesn't seem to work for me.

# October 12, 2007 2:13 PM

Jay R. Wren said:

I take it all back.  My guess is that Emacs or Brief named commands dont' work unless I am in that mode.

Window.NextSplitPane is the command for what I was looking.

# October 12, 2007 2:16 PM

Visual Studio 2008 ワンポイント said:

Ctrl + K 、 Ctrl + A キーを押すと、現在のアンカー位置が切り替わります。Emacs エミュレーションをテストしていたとき、私はどういうわけか、テスト ケースのコードを書くたびにこの機能を使い続けていました。エディタの既定の設定では使ったことがありませんでした。これは本来、私が使用するようなキー

# June 23, 2008 1:24 AM

Секреты Visual Studio said:

Ctrl+K, Ctrl+A изменяет позицию курсора. Я использовала эту функцию по любому поводу, когда тестировала

# October 13, 2008 8:33 AM
New Comments to this post are disabled
Page view tracker