File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
# devdocs
2
2
3
- Put your cursor on a word. Press Cmd + Shift + P to bring up the command palette. Choose "Doc" to
3
+ Put your cursor on a word or select it . Press Cmd + Shift + P to bring up the command palette. Choose "Doc" to
4
4
search on devdocs.io
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ module.exports = {
6
6
} ,
7
7
8
8
search : function ( ) {
9
- var wordUnderCursor = atom . workspace . getActiveTextEditor ( ) . getWordUnderCursor ( ) ;
9
+ var wordToSearchFor = atom . workspace . getActiveTextEditor ( ) . getSelectedText ( ) || atom . workspace . getActiveTextEditor ( ) . getWordUnderCursor ( ) ;
10
10
var shell = require ( 'shell' ) ;
11
- shell . openExternal ( "http://devdocs.io/#q=" + wordUnderCursor ) ;
11
+ shell . openExternal ( "http://devdocs.io/#q=" + wordToSearchFor ) ;
12
12
}
13
13
} ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " devdocs" ,
3
3
"main" : " ./lib/devdocs" ,
4
- "version" : " 0.2.1 " ,
4
+ "version" : " 0.3.0 " ,
5
5
"private" : true ,
6
6
"author" : {
7
7
"name" : " Abu Ashraf Masnun"
8
8
},
9
- "description" : " Put your cursor on a keyword and search for it using the 'doc' command" ,
9
+ "description" : " Put your cursor on a keyword or select it and search for it using the 'doc' command" ,
10
10
"repository" : {
11
11
"type" : " git" ,
12
12
"url" : " https://github.com/masnun/atom-devdocs"
13
13
},
14
14
"activationCommands" : {},
15
15
"license" : " MIT" ,
16
16
"engines" : {
17
- "atom" : " >0.50.0 "
17
+ "atom" : " >1.0.3 "
18
18
},
19
19
"dependencies" : {}
20
20
}
You can’t perform that action at this time.
0 commit comments