h-youhei / homedir Goto Github PK
View Code? Open in Web Editor NEWconfig files, misc tools
License: MIT License
config files, misc tools
License: MIT License
zt scrolls as current line is top
zz is same but middle
zb but bottom
use make
How to get floating state for current window?
rsync -rlpt
-a option is as -rlptgoD
-g preserve group, -o preserve owner, so dropping -go is the solution.
version 4.2-2
core code to do it
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' formats '%b'
zstyle ':vcs_info:*' actionformats '%b %a'
#this is called before showing prompt
precmd() {
vcs_info
}
PROMPT='${vcs_info_msg_0_}'
updatepointer?
In ivy switch buffer, when I call kill buffer action on current buffer item, the error appears.
Error in post-command-hook (ivy--exhibit): (error "Selecting deleted buffer")
The deleted item remain in ivy window. but actual it deleted.
After I close then reopen ivy window, the deleted item isn't there.
TODO: Does this happens also minimal configuration? If so I should report this upstream.
rsync doesn't have such option, so I have to do myself.
Are there remove hook? parhaps no.
In updete.sh, save file tree, compare, remove
create repository
copy and edit locale.conf to sh_common
move etc/ to new repos
write install script that
write configuration for root user. that
remove scripts under helper/
logind.conf
idleaction=suspend
idlesec=30m
works in console.
But in X, 30 minutes after startx, even I type keyboard, go into suspend.
error occured when I open vim from It's All Text!(firefox addon).
related code
autocmd BufReadPost * normal! g`"
map key :ls<CR>:buffer<Space>
map key :marks<CR>:
vim keep message
but
map key :marks<CR>
and
map ; :
then in vim, type
;marks;
vim trash massage
I suppose vim keep information only when type :
this doesn't work expected such as, can open it without warning, but can edit it
:sview %<CR>
copy current file to temp dir
open it as readonly
delete undofile that passed more than 3 days since last modified per a week
undodir is $XDG_DATA_HOME/nvim/undo
How do I get $HOME?
this is enough to try
Environment="HOME=/home/%u"
how to get last modlfied date for script
#epoch is time since 1970y/1m/1d 0h:0m:0s
#shows last modified time as sec since epoch
stat -c %Y filename
#shows current time as sec since epoch
date +%s
current - last modified > 3 days
3 days = 60s * 60m * 24h * 3d = 259200 sec
this problem is similar
If I do some edit before undoing, undo-tree-auto-save-history is broken.
This step work properly
This step doesn't work properly
emacs -Q
(package-initialize)
(require 'undo-tree)
(setq undo-tree-auto-save-history t)
(global-undo-tree-mode 1)
M-x find-file RET some-file RET
some edit
M-x save-buffer
M-x kill-emacs
emacs -Q
(package-initialize)
(require 'undo-tree)
(setq undo-tree-auto-save-history t)
(global-undo-tree-mode 1)
M-x find-file RET the file RET
some edit
M-x undo-tree-undo
M-x undo-tree-undo
Emacs complains "No further undo information".
Arch Linux
Emacs 25.2.1 gtk
SSD
Undo-tree 20170706.246
https://github.com/tyru/open-browser.vim
map <Plug>(openbrowser-smart-search)
let g:openbrowser_browser_commands
let g:openbrowser_search_engines
also linebreak or not
Which is better "to edit config file directory then backup" or "to edit config file in repos then update"?
start mode is hankaku
can control from script
work properly
ibus: hankaku
fcitx: zenkaku, but it can start with hankaku by adding english keyboard layout
ibus: ok. But in terminal, convert window is always located in bottom left of parent window.
fcitx: can't
ibus engine
fcitx-remote
fcitx can't commit when it switch layout
setting change layout of ibus and activate ime of mozc to same key doesn't work
cd `git rev-parse --show-toplevel 2>/dev/null`
2>/dev/null throw away error output
now focus is on normal buffer.
I want focus to minibuffer.
this code doesn't work
(defun abort-recusive-edit-remain-focus ()
(interactive)
(abort-recursive-edit)
(when (active-minibuffer-window)
(select-window (active-minibuffer-window)))
http://labs.timedia.co.jp/2011/04/9-points-to-customize-automatic-indentation-in-vim.html
end with:
add shortcut zsh and neovim to open the windows.
for shell
urxvtc
for vim
urxvtc -e nvim
for vim help
urxvtc -e nvim "-c help" "-c only"
from zsh
alias
from vim
:<C-u>call system('above code')<CR>
To insert tab manually, map tab-to-tab-stop to Tab
(define-key 'evil-insert-state-map [tab] #'tab-to-tab-stop)
But when I type Return, emacs remove manual indent.
So stop electric mode or not use electric mode for Return.
(electric-indent-mode 0)
; or
(setq electric-indent-chars (remq ?\n electric-indent-chars))
Sadly, if doing so, I can't get the benefits from emacs's auto indent.
Map newline-and-indent to Return so that I can be happy.
(define-key 'evil-insert-state-map [return] #'newline-and-indent)
Finally, I can indent manually and also get the benefits from emacs's auto indent.
(defun evil-maybe-remove-spaces-fix (&optional do-remove)
(if do-remove
(progn
(when (and
evil-maybe-remove-spaces
(save-excursion
(beginning-of-line)
(looking-at "^\\s-*$"))
(delete-region (line-beginning-position) (line-end-position))))
(setq evil-maybe-remove-spaces nil))
(setq evil-maybe-remove-spaces (memq this-command '(
evil-open-above
evil-open-below
evil-append
evil-append-line
newline
newline-and-indent
indent-and-newline)))))
(advice-add #'evil-maybe-remove-spaces :override #'evil-maybe-remove-spaces-fix)
split to this repository
sometimes PC freezes or crash Xserver.
I suspect xmonad or ibus-replace-with-kanji
query then get screen id
raise browser in such screen
I don't know how to get screen id from query.
http://vim.wikia.com/wiki/Disable_automatic_comment_insertion
help 'formatoptions'
This is overwritten by ftplugin, so I have to set the option with autocmd or in after dir.
for example,
"in init.vim
autocmd FileType * set formatoptions-=o
"in after/ftplugin/(filetype).vim
set formatoptions-=o
#exit when not have root privilege
test -z "$SUDO_USER" && exit
#run as user privilege
sudo -u $SUDO_USER command
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.