forked from burnettk/vim-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangular.txt
More file actions
79 lines (61 loc) · 4.02 KB
/
Copy pathangular.txt
File metadata and controls
79 lines (61 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
*angular.txt* Some niceties for using vim with the AngularJS framework.
Author: Kevin Burnett <http://notkeepingitreal.com/>
License: Same terms as Vim itself (see |license|)
This plugin is only available if 'compatible' is not set.
*angular*
There are separate javascript, html, and css runtime files, as well as lots of
other nice plugins that you may want to consider using if you're doing angular
development. See the README at https://github.com/burnettk/vim-angular for a
nice list.
NAVIGATING *angular-navigating*
Get around efficiently in an angular project.
*angular-gf*
gf Bolsters the original gf by also sending you to the
file under the cursor if the file has an implicit
"app" subdirectory prefix (a common grunt config). If
the word under the cursor is a service/directive/etc,
go to the file where it is defined. For example, if
your cursor is on BlahService, it will take you to
blah-service.js.
*angular-:A*
:A In a test file, edit the implementation, and vice
versa. It basically looks for a corresponding file in
a directory that looks like it might include tests or
app code, respectively. If this doesn't work, it is
quite likely because the angular directory structure
convention you're using is not conventional enough.
That's ok; you can tell angular.vim where your source
and test directories are located with
g:angular_source_directory and
g:angular_test_directory. You can disable this
functionality by doing this before the plugin loads:
let g:angular_skip_alternate_mappings = 1
*angular-:AS*
:AS Like :A, but in a split.
*angular-:AV*
:AV Like :A, but in a vertical split.
*angular-:AT*
:AT Like :A, but in a tab.
RUNNING A SPEC *angular-run-spec*
It doesn't actually run the spec, but it sure as hell looks like it does if you
have a karma watch going. Wut, you don't use karma watch? Dude!
*angular-:AngularRunSpec*
:AngularRunSpec Updates the spec where your cursor is sitting from
"it" to "fit" (the f stands for focus) and writes the
file. Why? Jasmine notices that you have a fit spec,
and, when you run your test suite, it will only run
that one spec. If the spec is already "focused" (with
"fit"), running this command will toggle it back to
"it." All of this is much more effective if you have
karma watching your files and running your tests
automatically when you save files. If you are using
jasmine 1, you need to specify iit instead of fit,
so set g:angular_jasmine_version = 1 in your .vimrc.
*angular-:AngularRunSpecBlock*
:AngularRunSpecBlock Perform the same dance as :AngularRunSpec but using the
describe block in which the cursor is sitting,
effectively running all specs inside the describe block.
ABOUT *angular-about*
Grab the latest version or report a bug on GitHub:
https://github.com/burnettk/vim-angular
vim:tw=78:et:ft=help:norl: