vim에서 주석문 박스만들기

rkdskd의 이미지

저는 코딩시에 주석박스를 아래처럼 사용하는데

/**********...........*
*                     *
*                     *
*****................*/

vim을 쓰다가 보면 주석박스를 만들기가 귀찮은 작업이더군요

줄 맞추기도 번거롭고 특히 뒷부분 * 가 들쭉 날쭉이죠..

박스를 만들어주는게 있더군요.

visual 모드에서 !boxes

제거할때는 !boxes -r ... 자세한 것은 도움말 파일을 참고하세요..

config 파일을 수정하면 멋진(?) 박스를 만들 수 있네요.

별의별 박스가 다 있네요... :D

여기를 참고 하세요..

http://boxes.thomasjensen.com/docs/install.shtml

Forums: 
rkdskd의 이미지

코딩시 마지막 문자를 라인업 해주는 툴도 있군요.

http://thomasjensen.com/software/tal/

백문이 불여일견....

예제는 아래에서 확인하세요 ( 파이어폭스에서는 정상적으로 보이지 않군요 익스 플로러에서 보시면 잘 보입니다. )

http://thomasjensen.com/software/tal/examples.shtml

cdpark의 이미지

좀 더 일반적인 도구로 par 란 명령도 있습니다.

acooda의 이미지

emacs에서도 저럴게 하는 방법이 있을가요...?

노트북 잃어버렸음;;

cychong의 이미지

위에 언급된 사이트에 가니까 emacs 용에 대한 내용도 있네요.

http://boxes.thomasjensen.com/docs/install.shtml

Integration with Emacs
Jason L. Shiffer kindly submitted the following information on integrating boxes with Emacs:

The simple interface (only a single box style, but easy): (defun boxes-create () (interactive) (shell-command-on-region (region-beginning) (region-end) "boxes -d c-cmt2" nil 1 nil)) (defun boxes-remove () (interactive) (shell-command-on-region (region-beginning) (region-end) "boxes -r -d c-cmt2" nil 1 nil)) Jason also wrote a boxes mode for Emacs. Remember to update the design list when you add new designs to your config file.

Life with fun...

rkdskd의 이미지

초간단 범위 지정 주석박스 생성법입니다.

boxes는 디폴트로 config 파일의 첫번째 주석문을 사용하더군요.

1. 비주얼 블럭 사용
- 주석문을 만들고 싶은 시작 라인을 visual block 으로 선택한다.(shift+v)
- 위에서 한줄이 선택되었죠. 이제 방향키(j 혹은 k)로 영역을 만든다.
- 이제 여러줄이 선택되었죠.
- :를 입력한다. 그러면 :'<,'> 이렇게 바뀌죠.
- !boxes 를 입력후 enter키를 누른다.
- 영역이 주석처리된다.
- 제거할때는 다시 비주얼 블럭으로 주석줄을 선택한다.
- :'<,'>!boxes -r 을 입력한다.

2. 범위지정 사용
- 주석문을 23번 줄에서 29번 줄까지 만들고 싶다.
- :23,29!boxes 입력한다.
- 제거하고자 할때는 마찬가지로 주석문영역을 지정(/* ... */ 라인 포함)하고 !boxes -r 엔터.

이상 초 간단 사용법이었습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.