developer tip

키보드 단축키로 코드 탐색

optionbox 2020. 11. 12. 08:07
반응형

키보드 단축키로 코드 탐색


나는 (지주 마우스 또는 긴 시간의 사용을 피하는 변경을 만들고 싶어 어디 빨리 도착, 키보드 단축키와 코드를 fastly 실행 할 필요성을 느끼기 시작하고있어 , , ).

나는 이미 일부를 사용하고 있습니다.

  • Home -현재 줄의 첫 번째 위치

  • End -현재 줄의 마지막 위치

  • Ctrl+ Home-전체 코드의 첫 번째 줄

  • Ctrl+ End-전체 코드의 마지막 줄

  • Page Up -동일한 수직 위치, 한 화면 위

  • Page Down -동일한 수직 위치, 한 화면 아래

  • Ctrl+ Page Up-현재 화면의 첫 번째 줄

  • Ctrl+ Page Down-현재 화면의 마지막 줄

  • Ctrl+ / -단어 당 단어 건너 뛰기

당신은 무엇을 가지고 있습니까?

Visual Studio를 사용합니다. (그러나 곧 다른 사람을 사용할 수 있으므로 어떤 답변에도 열려 있습니다.)

obs : 저는 stackoverflow를 통해 검색했지만이 콘텐츠에 대한 좋은 질문이나 키보드 코드 검색 목록을 찾지 못했습니다. 반복되면 못 찾아서 미안 해요 최선을 다해 여기있는 거에요.

이 질문은 바로 가기에 관한 것이 아니라 Visual Studio에 관한 것이 아니라 바로 가기로 코드를 실행하는 것에 관한 것입니다.


지금까지 질문에 적합한 답변 :

  • Ctrl+ --마지막 커서 위치로 이동

  • Ctrl+ Shift+ --다음 커서 위치로 이동

  • Ctrl+ F3-curson이있는 단어의 다음 발생으로 이동

  • Shift+ F3-위와 동일, 거꾸로.

  • F12 -커서가있는 메소드 / 변수 정의로 이동

  • Ctrl+ ]-일치하는 중괄호로 이동하여 선택

답이 있으면 더 많이 광고하겠습니다.


Visual Studio의 경우 Ctrl+ -는 귀중합니다 (마지막 위치로 이동).


Ctrl+ F3커서가있는 단어의 다음 항목을 찾습니다. 따라서 내 게시물에서 '발생'이라는 단어의 첫 번째 인스턴스를 클릭하고 Ctrl+를 누르면 F3두 번째 항목으로 이동합니다.


Visual Studio에서 많은 바로 가기 키와 Alt 키 메뉴 탐색도 많이 사용합니다.

Ctrl/ Shift F3검색을 반복하려면 뒤로 검색

Ctrl F3 현재 단어를 검색합니다.

F12 현재 단어의 정의로 이동합니다.

Ctrl F 검색 창을 열려면

Ctrl ] 일치하는 중괄호로 이동

Shift Ctrl ] 일치하는 중괄호로 이동하여

또한 ALT메뉴를 탐색 할 때-키를 사용하는 경향이 있습니다 . 밑줄이 보이기 때문에 쉽게 배울 수 있습니다. 예 : Alt- E F I(편집 / 찾기와 바꾸기 / 파일에서 찾기) 당신이 파일에서 찾기하는 데 많은 시간이 소요됩니다. Alt- L그런 다음 범위 지정 드롭 다운으로 이동합니다. 3 개의 화살표 키는 솔루션에서 찾기로 이동하거나 4 개의 화살표 키는 프로젝트에서 찾기로 이동합니다.

북마크 바로 가기도 있습니다. 북마크 CTRL K K를 전환하고 , 다음과 이전에 CTRL K L모두 지우는 것 입니다.CTRL K NCTRL K P

제가 함께 일하는 사람들 중 일부는 정말 지역을 좋아하지만 저는 그렇지 않아 CTRL M L모든 지역을 엽니 다. 그러나 CTRL M M코드 섹션을 축소하는 데 사용 하고 싶습니다 . 현재 메서드를 축소하고 축소 된 메서드를 선택한 다음 전체 내용을 클립 보드에 복사하는 것이 정말 편리합니다. CTRL M O모든 것을 정의로 축소합니다.


Alt + Up Arrow그리고 Alt + Down Arrow놀라운 명령입니다. 라인을 위아래로 이동합니다. 많은 키 입력을 저장하고 클립 보드를 망가뜨릴 필요가 없습니다. 여러 줄 선택에서도 작동합니다.

Alt + Shift + Arrow key블록을 선택할 수 있습니다. 많은 사람들이 모르는 것은 수직 블록 선택 (폭이 0 인)과 유형이있는 경우 모든 행에 동시에 입력된다는 것입니다. 매우 유용합니다.

If you wish to populate several lines with the same thing you can put it on the clipboard, make a vertical block selection across multiple rows, and paste into all the rows at the same time. This can also work to append to several rows at once, pasting into a selection that is to the right of the existing text.

Ctrl+Del deletes next word. However, if there is space after the cursor, it deletes all the space. Usually what you want when you have the cursor in the right place and the text is off to the right and that next word needs to be pulled over to the cursor.

Ctrl+Backspace deletes the previous word. Not particularly useful, but it's a good under-utilized shortcut. I see people mashing backspace all the time.

Although not strictly a keyboard shortcut, if you hold Alt and click somewhere in the text editor, it will force the cursor to be there. If you type it will automatically put in spaces or tabs appropriately to make that text be there.


F12 = Go To Definition of method/variable cursor is in. Works well combined with Heinzi's Ctrl + - answer to view definition of method then quickly go back to where you were using it.


You can find over 100 answers to this very same question here:

Favorite Visual Studio keyboard shortcuts


Alt + , Alt +

Will jump to next, previous code block (Method, class, etc.) Might only be in ReSharper.


On Visual Studio, but using a lot of the ReSharper shortcuts. A few that I use heaps:

  • Ctrl + N - Go to type

  • Ctrl + Shift + N - Go to file

  • Ctrl + Shift + Alt + N - Go to symbol

  • Ctrl + F12 - Go to method (in current file)

  • Ctrl + B (or Ctrl + Click) - Go to declaration

  • Ctrl + Shift + T - Go to type declaration

  • Alt + F7 - Find usage (or go to usage, if only one)

For the first four, resharper gives me a dropdown menu with options, filtered as I type, and they all support wildcards (*), and camel-hump navigation (typing SPI filters to just items such as SinglePassengerInfo, etc)


Honestly, I long for the day when VisVim gets to a good enough point to get me to buy it for Visual Studio (<3 VI keyboard commands).

Anyway, the command that I use the most in Vis Studio is Ctrl + D, which I have mapped to Edit.GotoFindCombo


C# VS 2008 Keyboard Shortcut Poster

VB.NET VS 2008 Keyboard Shortcut Poster

참고URL : https://stackoverflow.com/questions/1888161/navigating-through-code-with-keyboard-shortcuts

반응형