Dotfiles for frontend-developer.
git clone git://github.com/ignovak/dotfiles ~/dotfiles && ~/dotfiles/install.sh
- brew (requires https://developer.apple.com/downloads/)
- tmux
- ag
- tree
- httpie
- rvm
- zsh
- zsh-syntax-highlighting
ln -s /usr/local/share/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/
- zsh-syntax-highlighting
Uses oh-my-zsh and a bunch plugins for it (like common-aliases).
There are also some config files for bash.
There are some zsh-plugins (like git
and gitfast
) and .gitconfig file.
See list of aliases, provided by git plugin, here: https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git#aliases.
See vimtutor and :help.
The most important plugins:
NeoBundle – plugin manager
Unite – common shell for dealing with lists (sources)
Main use-cases (working with thi config):
<Space>b
- Show buffers list.<Space>f
- Search by project files. NB: might work slowly in projects with a large amount of files (~10k). For better setup consider using local .vimrc and .agignore files inside the project.<Space>/
,<Space>*
- Search by project code.<Space>m
- List of mappings.
You can add your own sources.
VimShell – powerful shell inside vim
Opens by \h
(<leader>h
)
VimFiler – advanced file manager (replaces netrw and nerdtree)
Toggles by <Bs>
\f
(<leader>f
) opens vimfiler and finds current file
See help (g?
in vimfiler buffer or :h vimfiler
) for learning mappings. Some examples:
v
- File preview
o
, <CR>
- Open file/directory
l
, <Right>
- Move to file or directory
h
, <Left>
- Move to parent directory
gf
- Search files in current directory (uses Unite file_rec
)
gr
- Search code in current directory (uses Unite grep
)
File operations:
-
r
- Rename file/directory -
N
- New file -
K
- New directory -
cc
- copy file/directory -
dd
- delete file/directory -
mm
- move file/directory
Neosnippet – snippet support
Expanding snippets by <Tab>
. Examples:
For css
dn ->
display: none;
poa ->
position: absolute;
For js
cl ->
console.log(${1});
f ->
function(${1}) {
${3}
}${2}
You can add your own snippets in ~/.vim/snippets/*
and helper utils for them (in ~/.vim/snippets/support_functions.vim
).
tComment – code commenting
Usage:
gc<motion>
in normal-mode comments text by motion. E.g.,gcip
comment the entire paragraphgcc
in normal-mode comments one linegc
in visual-mode comments selected text
Surround – handy actions with quotes and brackets
See documentation. Simple examples: dsb
deletes parentheses and cs"'
changes double quotes to single.
Fugitive – powerful plugin for working with git
Some use cases:
\g
(:Gstatus
) opengit status
in split- in same split you can add / remove files from stage with
-
D
will open diffview of previous and current versions of<cfile>
(same is for:Gdiff
):Gblame
opensgit blame
in vertical split. Pressingo
or<cr>
on<cword>
opens commit preview. Also\b
works (for normal and visual modes)
Shell-commands
tm
- create new tmux-session on sockettm-$USER
tm a
- open previous session
Tmux-commands
<c-b>?
- help (available commands list). Closed by q<c-b>c
- Open new window in current session<c-b>n
/<c-b>p
/<c-b>2
- Go to next / previous window / window #2<c-b>%
/<c-b>"
- Open vertical ⎅ / horizontal ⌸ split<c-b>o
- Move between splits<c-b>$
- Rename session<c-b>s
- Switch sessions
There are some useful scripts in bin
directory. E.g.:
watch
watches file system changes (useful for debugging)
Please, ask any questions or add comments at issues.