tag:blogger.com,1999:blog-6579772240267288367.post2828577862913542419..comments2023-06-05T08:45:12.716-04:00Comments on kwblog: Vim TFS IntegrationKevin Berridgehttp://www.blogger.com/profile/13759114853595462455noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6579772240267288367.post-13930736010891775422012-09-26T06:35:25.387-04:002012-09-26T06:35:25.387-04:00This worked for me:
nnoremap to :execute "!tf...This worked for me:<br />nnoremap to :execute "!tf checkout " . expand('%:p')Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-40138592297850438012012-08-13T19:13:59.794-04:002012-08-13T19:13:59.794-04:00When you open a file in visual studio it checks ou...When you open a file in visual studio it checks out the file when you modify it.<br />To do something along those lines I added this to my _vimrc:<br /><br />au BufReadPre * if &readonly | call Tfcheckout() | endifAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-28656379484589896472011-11-16T09:25:49.309-05:002011-11-16T09:25:49.309-05:00There's a full vim script to do this now:
htt...There's a full vim script to do this now:<br /><br />http://www.vim.org/scripts/script.php?script_id=3808c++numptyhttps://www.blogger.com/profile/02655896564457579290noreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-80490405512075168822010-10-28T14:16:24.166-04:002010-10-28T14:16:24.166-04:00Hello, as i can't acces tf by the cmd used the...Hello, as i can't acces tf by the cmd used the following vimrc: <br /><br />colorscheme slate <br /><br />function! TFcheckout()<br />exe '!""C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" checkout "'expand('%:p')'""'<br />endfunction<br />command! TFcheckout :call TFcheckout()<br /><br />function! TFcheckin()<br />exe '!""C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" checkout "'expand('%:p')'""'<br />endfunction<br />command! TFcheckin :call TFcheckin()<br /><br />function! TFhistory()<br />if bufnr("TFhistory") >0<br />exe "sb TFhistory"<br />else<br />exe "split TFhistory"<br />endif<br />setlocal noswapfile<br />set buftype=nofile<br />setlocal modifiable<br />silent! exe 'r!""C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" history "#""'<br />setlocal nomodified<br />normal 1G<br />wincmd J<br />endfunction<br />command! TFhistory :call TFhistory()Badosohttps://www.blogger.com/profile/11452145886358783561noreply@blogger.comtag:blogger.com,1999:blog-6579772240267288367.post-24504599092182925892008-10-16T13:52:00.000-04:002008-10-16T13:52:00.000-04:00I have added the following to your code. It requir...I have added the following to your code. It requires Team Foundation Power Tools for the history command, and checking comments are truncated, but it still is handy:<BR/><BR/>function! TFhistory()<BR/> if bufnr("TFhistory") >0<BR/> exe "sb TFhistory"<BR/> else<BR/> exe "split TFhistory"<BR/> endif<BR/> setlocal noswapfile<BR/> set buftype=nofile<BR/> setlocal modifiable<BR/> silent! exe 'r!tfpt history "#"'<BR/> setlocal nomodified<BR/> normal 1G<BR/> wincmd J<BR/>endfunction<BR/>command! TFhistory :call TFhistory()MattKhttps://www.blogger.com/profile/03232119738920744507noreply@blogger.com