Skip to content

Commit 886ad89

Browse files
committed
Merge pull request #1 from vim-ctrlspace/feature_syntax_highlighting
Feature syntax highlighting
2 parents 90fce3a + f0f4e66 commit 886ad89

8 files changed

+202
-77
lines changed

_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ github_username: "vim-ctrlspace/vim-ctrlspace"
1919
excerpt_separator: "<!-- more -->"
2020

2121
# Build settings
22-
markdown: kramdown
22+
markdown: redcarpet
23+
highlighter: pygments

_posts/2015-12-01-adding_a_project_to_bookmarks.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ categories: asciicast
1717
change that! Fasten your seatbelts and add your first project to bookmarks
1818
following the steps below!
1919

20-
{% gist ryrych/5e4ec3fb8ccad17e04d8 %}
20+
```console
21+
$ vim
22+
<kbd>CTRL</kbd>+<kbd>C</kbd>
23+
<kbd>b</kbd>
24+
<kbd>a</kbd>
25+
⌗ Add directory to bookmarks: /Users/ryrych/projects/ember_awesome/<kbd>Enter</kbd>
26+
⌗ New bookmark name: Ember is Awesome Bookmark<kbd>Enter</kbd>
27+
```
2128

2229
After adding the project to bookmarks, you choose the project from the list
2330
using <kbd>j</kbd> and <kbd>k</kbd> keys. Press <kbd>Enter</kbd> to confirm.

_posts/2015-12-01-finding-bookmarked-projects.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ Once you [added your first project to bookmarks][1], every time you start
1616
working on the project, after opening *Vim*, you have to select the project in
1717
*Vim-CtrlSpace*. Fortunately it’s a walk in the park! See below how easy it is:
1818

19-
{% gist ryrych/c2d868449e4dcf18cdd1 %}
19+
```console
20+
$ vim
21+
[CTRL]+[C]
22+
[B]
23+
```
2024

2125
Capital <kbd>B</kbd> **opens the project list in a search mode** so you can start
2226
typing your search term.

_posts/2015-12-01-grouping-files.md

+38-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,41 @@ the project scope. This way a third tab, *Plans & goals* can be added.
2424

2525
Will **learning Vim-CtrlSpace** land in your **2016 Plan & goals** list?
2626

27-
{% gist ryrych/e95ba23a5f71c93cfda4 %}
27+
```console
28+
$ vim
29+
30+
# Open Ember project
31+
[CTRL]+[SPACE]
32+
[B]
33+
>ember<
34+
[Enter]
35+
36+
# Search for `README.md` and open it in the current tab without closing the plugin window
37+
[O]
38+
>readme<
39+
[enter][space]
40+
41+
# Open 3 files in a separate tab (note the `+3` indicator)
42+
[/]
43+
[CTRL]+[U]
44+
>computed<
45+
46+
# Select each file with:
47+
[SHIFT]+[T]
48+
49+
# Clear search term
50+
[/]
51+
[CTRL]+[U]
52+
[/]
53+
54+
# Open list of tabs
55+
[l]
56+
57+
# Give second tab custom label
58+
[j]
59+
[=]
60+
>Computed feature + spec<
61+
[Enter]
62+
[ESC]
63+
[qa]
64+
```

_sass/_syntax-highlighting.scss

-71
This file was deleted.

_sass/_syntax.scss

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// theme from: https://github.com/richleland/pygments-css
2+
// .highlight box styles taken from https://github.com/suan/vim-instant-markdown
3+
4+
.highlight pre {
5+
background-color: rgb(247, 247, 247);
6+
border-radius: 3px;
7+
font-size: 68%; // 13.6px - github size
8+
line-height: 1.45;
9+
overflow-x: auto;
10+
overflow-y: auto;
11+
padding: 16px;
12+
word-wrap: normal;
13+
}
14+
15+
.highlight pre code {
16+
background-color: transparent;
17+
border: 0px;
18+
display: inline;
19+
line-height: inherit;
20+
margin: 0px;
21+
max-width: initial;
22+
overflow: initial;
23+
padding: 0px;
24+
word-wrap: normal;
25+
}
26+
27+
.highlight pre > code {
28+
background: transparent;
29+
border: 0px;
30+
font-size: 100%;
31+
margin: 0px;
32+
padding: 0px;
33+
white-space: pre;
34+
word-break: normal;
35+
}
36+
37+
code {
38+
background-color: rgba(0, 0, 0, 0.0392157);
39+
border-radius: 3px;
40+
font-size: 85%;
41+
margin: 0px;
42+
padding: 0.2em 0px;
43+
}
44+
45+
.highlight code, .highlight pre{color:#fdce93;background-color:#3f3f3f}
46+
.highlight .hll{background-color:#222}
47+
.highlight .c{color:#7f9f7f}
48+
.highlight .err{color:#e37170;background-color:#3d3535}
49+
.highlight .g{color:#7f9f7f}
50+
.highlight .k{color:#f0dfaf}
51+
.highlight .l{color:#ccc}
52+
.highlight .n{color:#dcdccc}
53+
.highlight .o{color:#f0efd0}
54+
.highlight .x{color:#ccc}
55+
.highlight .p{color:#41706f}
56+
.highlight .cm{color:#7f9f7f}
57+
.highlight .cp{color:#7f9f7f}
58+
.highlight .c1{color:#7f9f7f}
59+
.highlight .cs{color:#cd0000;font-weight:bold}
60+
.highlight .gd{color:#cd0000}
61+
.highlight .ge{color:#ccc;font-style:italic}
62+
.highlight .gr{color:red}
63+
.highlight .gh{color:#dcdccc;font-weight:bold}
64+
.highlight .gi{color:#00cd00}
65+
.highlight .go{color:gray}
66+
.highlight .gp{color:#dcdccc;font-weight:bold}
67+
.highlight .gs{color:#ccc;font-weight:bold}
68+
.highlight .gu{color:purple;font-weight:bold}
69+
.highlight .gt{color:#0040D0}
70+
.highlight .kc{color:#dca3a3}
71+
.highlight .kd{color:#ffff86}
72+
.highlight .kn{color:#dfaf8f;font-weight:bold}
73+
.highlight .kp{color:#cdcf99}
74+
.highlight .kr{color:#cdcd00}
75+
.highlight .kt{color:#00cd00}
76+
.highlight .ld{color:#cc9393}
77+
.highlight .m{color:#8cd0d3}
78+
.highlight .s{color:#cc9393}
79+
.highlight .na{color:#9ac39f}
80+
.highlight .nb{color:#efef8f}
81+
.highlight .nc{color:#efef8f}
82+
.highlight .no{color:#ccc}
83+
.highlight .nd{color:#ccc}
84+
.highlight .ni{color:#c28182}
85+
.highlight .ne{color:#c3bf9f;font-weight:bold}
86+
.highlight .nf{color:#efef8f}
87+
.highlight .nl{color:#ccc}
88+
.highlight .nn{color:#8fbede}
89+
.highlight .nx{color:#ccc}
90+
.highlight .py{color:#ccc}
91+
.highlight .nt{color:#9ac39f}
92+
.highlight .nv{color:#dcdccc}
93+
.highlight .ow{color:#f0efd0}
94+
.highlight .w{color:#ccc}
95+
.highlight .mf{color:#8cd0d3}
96+
.highlight .mh{color:#8cd0d3}
97+
.highlight .mi{color:#8cd0d3}
98+
.highlight .mo{color:#8cd0d3}
99+
.highlight .sb{color:#cc9393}
100+
.highlight .sc{color:#cc9393}
101+
.highlight .sd{color:#cc9393}
102+
.highlight .s2{color:#cc9393}
103+
.highlight .se{color:#cc9393}
104+
.highlight .sh{color:#cc9393}
105+
.highlight .si{color:#cc9393}
106+
.highlight .sx{color:#cc9393}
107+
.highlight .sr{color:#cc9393}
108+
.highlight .s1{color:#cc9393}
109+
.highlight .ss{color:#cc9393}
110+
.highlight .bp{color:#efef8f}
111+
.highlight .vc{color:#efef8f}
112+
.highlight .vg{color:#dcdccc}
113+
.highlight .vi{color:#ffffc7}
114+
.highlight .il{color:#8cd0d3}

css/main.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ $on-laptop: 800px;
4949
@import
5050
"base",
5151
"layout",
52-
"syntax-highlighting"
52+
"syntax"
5353
;

getting-started.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,40 @@ To not mess up your original config, plugins will be installed in
5454

5555
Copy the content and store it somewhere.
5656

57-
<script src="https://gist.github.com/ryrych/895bbabd3f6c40bf7d29.js"></script>
57+
```vim
58+
set nocompatible
59+
filetype off
60+
61+
set rtp+=~/.vim/bundle/Vundle.vim
62+
" Change path if necessary
63+
call vundle#begin('~/vim-ctrlspace-learning')
64+
65+
Plugin 'VundleVim/Vundle.vim'
66+
Plugin 'szw/vim-ctrlspace'
67+
Plugin 'NLKNguyen/papercolor-theme'
68+
69+
call vundle#end()
70+
filetype plugin indent on
71+
72+
set t_Co=256
73+
set background=dark
74+
colorscheme PaperColor
75+
76+
set nocompatible
77+
set hidden
78+
set wildignore=.git,.svn,CVS,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,*.pyc,tags,*.tags
79+
80+
if has("gui_running")
81+
" Settings for MacVim and Inconsolata font
82+
let g:CtrlSpaceSymbols = { "File": "◯", "CTab": "▣", "Tabs": "▢" }
83+
endif
84+
85+
if executable("ag")
86+
let g:CtrlSpaceGlobCommand = 'ag -l --nocolor -g ""'
87+
endif
88+
89+
let g:CtrlSpaceIgnoredFiles = '\v(tmp|temp|Godeps)[\/]'
90+
```
5891

5992
### Install Vim-CtrlSpace and plugins
6093

0 commit comments

Comments
 (0)