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

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

Issue 904143003: [ycm] The YouCompleteMe configuration is not VIM specific. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « tools/ninja/ninja_output.py ('k') | tools/vim/ninja_output.py » ('j') | 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) 2015 the V8 project authors. All rights reserved. 1 " Copyright (c) 2015 the V8 project 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. On Windows, Ctrl-F7 (which is the same as the VS default). 6 " this command. On Windows, Ctrl-F7 (which is the same as the VS default).
7 " On Linux, <Leader>o, which is \o by default ("o"=creates .o files) 7 " On Linux, <Leader>o, which is \o by default ("o"=creates .o files)
8 " 8 "
9 " Adds a "Build this target" function, using ninja. This is not bound 9 " Adds a "Build this target" function, using ninja. This is not bound
10 " to any key by default, but can be used via the :CrBuild command. 10 " to any key by default, but can be used via the :CrBuild command.
(...skipping 29 matching lines...) Expand all
40 while candidate and not all( 40 while candidate and not all(
41 [os.path.isdir(os.path.join(candidate, fp)) for fp in fingerprints]): 41 [os.path.isdir(os.path.join(candidate, fp)) for fp in fingerprints]):
42 candidate = os.path.dirname(candidate) 42 candidate = os.path.dirname(candidate)
43 return candidate 43 return candidate
44 44
45 45
46 def path_to_build_dir(configuration): 46 def path_to_build_dir(configuration):
47 """Returns <v8_root>/<output_dir>/(Release|Debug).""" 47 """Returns <v8_root>/<output_dir>/(Release|Debug)."""
48 48
49 v8_root = path_to_source_root() 49 v8_root = path_to_source_root()
50 sys.path.append(os.path.join(v8_root, 'tools', 'vim')) 50 sys.path.append(os.path.join(v8_root, 'tools', 'ninja'))
51 from ninja_output import GetNinjaOutputDirectory 51 from ninja_output import GetNinjaOutputDirectory
52 return GetNinjaOutputDirectory(v8_root, configuration) 52 return GetNinjaOutputDirectory(v8_root, configuration)
53 53
54 54
55 def compute_ninja_command_for_targets(targets='', configuration=None): 55 def compute_ninja_command_for_targets(targets='', configuration=None):
56 flags = [] 56 flags = []
57 if "use_goma=1" in os.getenv('GYP_DEFINES', '').split(' '): 57 if "use_goma=1" in os.getenv('GYP_DEFINES', '').split(' '):
58 flags = ['-j', '512'] 58 flags = ['-j', '512']
59 build_dir = path_to_build_dir(configuration); 59 build_dir = path_to_build_dir(configuration);
60 build_cmd = ' '.join(['ninja'] + flags + ['-C', build_dir, targets]) 60 build_cmd = ' '.join(['ninja'] + flags + ['-C', build_dir, targets])
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 if has('mac') 111 if has('mac')
112 map <D-k> :CrCompileFile<cr> 112 map <D-k> :CrCompileFile<cr>
113 imap <D-k> <esc>:CrCompileFile<cr> 113 imap <D-k> <esc>:CrCompileFile<cr>
114 elseif has('win32') 114 elseif has('win32')
115 map <C-F7> :CrCompileFile<cr> 115 map <C-F7> :CrCompileFile<cr>
116 imap <C-F7> <esc>:CrCompileFile<cr> 116 imap <C-F7> <esc>:CrCompileFile<cr>
117 elseif has('unix') 117 elseif has('unix')
118 map <Leader>o :CrCompileFile<cr> 118 map <Leader>o :CrCompileFile<cr>
119 endif 119 endif
OLDNEW
« no previous file with comments | « tools/ninja/ninja_output.py ('k') | tools/vim/ninja_output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698