Skip to content

Commit a7e8d94

Browse files
committed
move from marked to marked-it + highlight.js for syntax highlighting
1 parent 1210fd9 commit a7e8d94

8 files changed

+395
-337
lines changed

CHANGELOG.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#cVim Changelog
1+
# cVim Changelog
22

33
## 1.2.84
44
* Bug fixes
@@ -122,7 +122,7 @@ and why it occurred.
122122

123123
## 1.2.56
124124
* **Important!** The behavior of commands that open links (`:open`, `:tabnew`, `:history`, etc) has changed. See [the mappings page](./mappings.html#tabs) for more information.
125-
* Awesome new feature! It's now possible to use Vim to edit text boxes. All that is needed is a python script that can be found here: https://github.com/1995eaton/chromium-vim/blob/master/cvim_socket.py
125+
* Awesome new feature! It's now possible to use Vim to edit text boxes. All that is needed is a python script that can be found [here](https://github.com/1995eaton/chromium-vim/blob/master/cvim_server.py)
126126
* To get things running, just run the script: `python cvim_socket.py` and press `<C-i>` inside a text box.
127127
* As a result of the above, the insert mapping `<C-i>` (beginningOfLine) is now `<C-a>`.
128128
* Smoother scrolling
@@ -148,12 +148,12 @@ and why it occurred.
148148

149149
## 1.2.53
150150
* **Important!** cVimrc blacklists are now a part of the cVimrc. Previous blacklists should carry over to the cVimrc text area. New blacklists can be declared like this:
151-
```viml
151+
```vim
152152
let blacklists = ["https://www.google.com"]
153153
```
154154
* When defining custom search engines, you can now add the string ```%s``` somewhere inside the URL to indicate that the query should be inserted in this place. This is useful for search engines with URLs that have non-standard structures. For instance:
155155

156-
```viml
156+
```vim
157157
" If you search for 'test' using this engine, cVim
158158
" will open this link -> http://www.example.com/test?type=search
159159
let searchengine example = "http://www.example.com/%s?type=search"
@@ -178,12 +178,12 @@ let searchengine example = "http://www.example.com/search?query=%s" "This is no
178178

179179
## 1.2.51
180180
* **Important!** cVimrc setting are now stricter. You must use 'let' instead of set when using options requiring an equal symbol. For example:
181-
```viml
181+
```vim
182182
set hintcharacters = abc123 "Incorrect!
183183
let hintcharacters = "abc123" "Correct
184184
```
185185
* Added completionengines option to cVimrc (choose which completion engines to display). For example:
186-
```viml
186+
```vim
187187
let completionengines = ["google", "imdb"] "Only these engines will appear in the search autocomplete menu
188188
```
189189
* Added autohidecursor option (useful for Linux operating systems, which don't automatically hide the mouse cursor when a key is pressed). You can test this out by running the command ```:set autohidecursor``` and scrolling with j/k (might have to nudge mouse cursor then scroll to see it disappear initially).

README.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#What is cVim?
1+
# What is cVim?
22

33
Vim for Google Chrome. I hate using the mouse, especially after learning Vim. With my desktop (Linux), I have a lot of key bindings that make doing things easier: I open Chrome with `Alt+w`, I close a window with `Alt+Shift+d`, I open a terminal with `Alt+t`. This is harder to do with Chrome because it has no section for customizing keyboard shortcuts, and it is still necessary to use the mouse to do things like click links. cVim aims to eliminate this problem as best as the Chrome extensions API will allow it to.
44

5-
#Where can I get cVim?
5+
# Where can I get cVim?
66

77
* There are two ways:
88
* You can install it through the [Chrome web store](https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh)
@@ -23,8 +23,8 @@ These extensions do a wonderful job of adding Vim-like keybindings to Google Chr
2323
* Command bar with tab-completion
2424
* Smooth scrolling
2525

26-
#cVim Help
27-
###cVimrc
26+
# cVim Help
27+
### cVimrc
2828

2929
* Boolean cVimrc settings are enabled with the command ```'set' + <SETTING_NAME>``` and disabled with
3030
the command ```'set' + no<SETTING_NAME>``` (for example, ```set regexp``` and ```set noregexp```)
@@ -81,8 +81,8 @@ These extensions do a wonderful job of adding Vim-like keybindings to Google Chr
8181
| vimcommand | string | set the command to be issued with the `editWithVim` command | "gvim -f" |
8282
| langmap | string | set a list of characters to be remapped (see vims langmap) | "" |
8383

84-
###Example configuration
85-
```viml
84+
### Example configuration
85+
```vim
8686
" Settings
8787
set nohud
8888
set nosmoothscroll
@@ -183,14 +183,14 @@ set localconfig " Update settings via a local file (and the `:source` command) r
183183
" settings from there
184184
```
185185

186-
###Blacklists
186+
### Blacklists
187187
* The blacklists setting uses a custom inplementation of Chrome's @match pattern guidelines.
188188
See https://developer.chrome.com/extensions/match_patterns for a description of the syntax.
189189

190190

191-
###Site-specific Configuration
191+
### Site-specific Configuration
192192
* You can enable certain rc settings for sites using the blacklist match pattern as described above
193-
```viml
193+
```vim
194194
" this will enable the config block below on the domain 'reddit.com'
195195
site '*://*.reddit.com/*' {
196196
unmap j
@@ -199,30 +199,30 @@ site '*://*.reddit.com/*' {
199199
}
200200
```
201201

202-
###Running commands when a page loads
202+
### Running commands when a page loads
203203
* In a similar fashion to the site-specific configuration described above, cVim can run commands when a page is loaded with the `call` keyword
204-
```viml
205-
" In this case, when pages with a file ending in ".js" are loaded,
204+
```vim
205+
" In this case, when pages with a file ending in '.js' are loaded,
206206
" cVim will pin the tab and then scroll down
207207
site '*://*/*.js' {
208208
call :pintab
209209
call scrollDown
210210
}
211211
```
212212

213-
###Mappings
213+
### Mappings
214214
* Normal mappings are defined with the following structure: ```map <KEY> <MAPPING_NAME>```
215215
* Insert mappings use the same structure, but use the command "imap" instead of "map"
216216
* Control, meta, and alt can be used also:
217-
```viml
217+
```vim
218218
<C-u> " Ctrl + u
219219
<M-u> " Meta + u
220220
<A-u> " Alt + u
221221
```
222222
* It is also possible to unmap default bindings with ```unmap <KEY>``` and insert bindings with ```iunmap <KEY>```
223223
* To unmap all default keybindings, use ```unmapAll```. To unmap all default insert bindings, use ```iunmapAll```
224224

225-
###Tabs
225+
### Tabs
226226
* Commands that open links (`:tabnew` and `:open`) have three different properties
227227
* `!` => Open in a new tab
228228
* `$` => Open in a new window
@@ -233,7 +233,7 @@ site '*://*/*.js' {
233233
* `=` => Treat the query as a URL
234234
* The use of these properties are best explained with examples:
235235

236-
```viml
236+
```vim
237237
:open! google<CR> " This is the same as :tabnew google<CR>
238238
239239
:open google!<CR> " This is another way of writing the above
@@ -261,7 +261,7 @@ site '*://*/*.js' {
261261
:bookmarks my_bookmark.com " same tab
262262
```
263263

264-
###Code blocks
264+
### Code blocks
265265
* Code blocks allow you to interact with cVim's content scripts via the cVimrc.
266266
* Since code blocks use `eval(...)`, you should only use them if you know what you're doing.
267267

@@ -293,19 +293,19 @@ switchHintCharacters -> {{
293293
map <Tab> :call switchHintCharacters<CR>
294294
```
295295
296-
###Completion Engines
296+
### Completion Engines
297297
* These are a list of completion engines that can be used in the command bar. They can be set
298298
by assigning their names to an array with the `completionengines` variable.
299299
* google, wikipedia, youtube, imdb, amazon, google-maps, wolframalpha, google-image, ebay,
300300
webster, wictionary, urbandictionary, duckduckgo, answers, google-trends, google-finance,
301301
yahoo, bing, themoviedb
302302
* Example usage:
303-
```vim
303+
```vim
304304
let completionengines = ['google', 'google-image', 'youtube'] " Show only these engines in the command bar
305-
```
305+
```
306306

307307

308-
#Keybindings
308+
# Keybindings
309309

310310
| Movement | | Mapping name |
311311
| ------------------------- | :-------------------------------------------------------------------- | :------------------------------ |
@@ -451,7 +451,7 @@ let completionengines = ['google', 'google-image', 'youtube'] " Show only these
451451
| unmapped | select input text (equivalent to `<C-a>`) | selectAll |
452452
| unmapped | edit with Vim in a terminal (need the [cvim_server.py](https://github.com/1995eaton/chromium-vim/blob/master/cvim_server.py) script running for this to work) | editWithVim |
453453

454-
#Command Mode
454+
# Command Mode
455455

456456
| Command | Description |
457457
| ------------------------------------------- | -------------------------------------------------------------------------------------- |
@@ -485,7 +485,7 @@ let completionengines = ['google', 'google-image', 'youtube'] " Show only these
485485
| :pintab | pin the current tab |
486486
| :unpintab | unpin the current tab |
487487

488-
#Tips
488+
# Tips
489489

490490
* You can use `@%` in "open" commands to specify the current URL.
491491
For example, `:open @%` would essentially refresh the current page.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
},
99
"private": true,
1010
"devDependencies": {
11-
"marked": "0.3.2",
11+
"highlight.js": "latest",
12+
"markdown-it": "latest",
1213
"pegjs": "latest"
1314
}
1415
}

0 commit comments

Comments
 (0)