Code Monkey home page Code Monkey logo

dotfiles's People

Contributors

wtsnjp avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

LaTeX 用の段落オブジェクト (ap/ip) 設定

LaTeX 文書ソースを編集中,gqap のようにすると(空行で区切られた)現在段落を整形することができて便利である.しかし,LaTeX では意味上の改段落をせずにコメント文字 % を用いて形式的にコードブロックを分けたいことがある.

e.g.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
%
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
%
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiatnulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

このような状況では先頭に % だけを含む行は空行と同じように「段落の区切り」と見なすようにできると嬉しい.

MoveBOL() 関数がビジュアルモードでうまく動作しない

現在の .vimrc では以下の設定で本来の ^ モーションと 0 モーションをトグルして ^ だけに統一している(これにより 0 を別のマッピングに使えるようになる).

noremap <silent> ^ :<C-u>call MoveBOL()<CR>
noremap - $
noremap 0 %
function! MoveBOL()
  let l:pre_col = col(".")
  normal! ^
  if col(".") == l:pre_col
    normal! 0
  endif
endfunction

しかし,現在の MoveBOL() 関数の実装ではビジュアルモードで ^ を押した際にも normal! コマンドの働きによって強制的にノーマルモードに移行してしまい,意図したようにビジュアルモードでの選択範囲を変更することができない.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.