2012-07-31 1 views
0

vim-rails에서 :A (예 : 컨트롤러와 사양 사이를 전환)을 시도하고 있습니다.디렉토리에서 Vim을 열 때 자동으로 '경로 설정'하는 방법은 무엇입니까?

E345: Can't find file "app/controllers/widgets_controller.rb" in path 

그때 명시 적 경로 설정하는 경우 : :A 작품으로 다음

:set path=/Users/me/Documents/Code/my-project 

을 내가 vim .를 실행 내 레일 프로젝트로 이동 한 경우, 컨트롤러 파일을 열고 :A를 실행, 나는 오류 예상했다. Vim으로 디렉토리를 열면 초기에 경로를 어떻게 설정할 수 있습니까?

답변

1

디렉토리를 열 때 정확하지 않습니다. 프로젝트에서 작업 한 것으로 보이므로 project plugin을 시도해보십시오.

이것을 사용하면 프로젝트를 시작하거나 종료 할 때 임의의 명령을 실행할 수 있습니다. 플러그인 설명에서

:

You can use this plugin's basic functionality to set up a list of frequently-accessed files for easy navigation. The list of files will be displayed in a window on the left side of the Vim window, and you can press or double-click on filenames in the list to open the files. This is similar to how some IDEs I've used work. I find this easier to use than having to navigate a directory hierarchy with the file-explorer. It also obviates the need for a buffer explorer because you have your list of files on the left of the Vim Window.

+0

흥미, 감사 eckes은 - 유망 보인다. 내일 이걸 시험해 볼거야. – recurser