Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: tools/vim/ninja-build.vim

Issue 9232065: ninja-build.vim should redraw! after running make. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 " Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 " Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 " Use of this source code is governed by a BSD-style license that can be 2 " Use of this source code is governed by a BSD-style license that can be
3 " found in the LICENSE file. 3 " found in the LICENSE file.
4 " 4 "
5 " Adds a "Compile this file" function, using ninja. On Mac, binds Cmd-k to 5 " Adds a "Compile this file" function, using ninja. On Mac, binds Cmd-k to
6 " this command. 6 " this command.
7 " 7 "
8 " Requires that gyp has already generated build.ninja files, and that ninja is 8 " Requires that gyp has already generated build.ninja files, and that ninja is
9 " in your path (which it is automatically if depot_tools is in your path). 9 " in your path (which it is automatically if depot_tools is in your path).
10 " 10 "
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 71
72 def set_makepgr_to_single_file_ninja(): 72 def set_makepgr_to_single_file_ninja():
73 vim.command('let &makeprg="%s"' % compute_ninja_command()) 73 vim.command('let &makeprg="%s"' % compute_ninja_command())
74 endpython 74 endpython
75 75
76 fun! CrCompileFile() 76 fun! CrCompileFile()
77 let l:oldmakepgr = &makeprg 77 let l:oldmakepgr = &makeprg
78 python set_makepgr_to_single_file_ninja() 78 python set_makepgr_to_single_file_ninja()
79 silent make | cwindow 79 silent make | cwindow
80 redraw!
80 let &makeprg = l:oldmakepgr 81 let &makeprg = l:oldmakepgr
81 endfun 82 endfun
82 83
83 command! CrCompileFile call CrCompileFile() 84 command! CrCompileFile call CrCompileFile()
84 85
85 if has('mac') 86 if has('mac')
86 map <D-k> :CrCompileFile<cr> 87 map <D-k> :CrCompileFile<cr>
87 imap <D-k> <esc>:CrCompileFile<cr> 88 imap <D-k> <esc>:CrCompileFile<cr>
88 endif 89 endif
89 " TODO(linuxuser): Suggest a keyboard shortcut and send review to thakis@. 90 " TODO(linuxuser): Suggest a keyboard shortcut and send review to thakis@.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698