vi 에디터 문법 검사 플러그인이 헤더파일(.h)도 검사 해주나요?

duty7351의 이미지

Vundle에 scrooloose/syntastic 설치해서 잘 사용 하고 있습니다. 그런데 의문이 있는게 예를들어,

BinarySearchTree.cpp 는 :w를 할시에 문법 검사를 잘 해주지만

BinarySearchTree.h 에서는 문법 검사를 하지 않고 넘어갑니다.

혹시 헤더파일도 문법검사를 할 수 있게 하는 방법이 있을까요?

아래는 제 .vimrc 플러그인과 설정입니다.

set nocompatible
filetype off

" for Vundle -----------------------------------------
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin),
"Plugin 'file:///home/jjeaby/Dev/tools/vim-plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
Plugin 'matchparenpp' " 괄호 확인
Plugin 'townk/vim-autoclose' " 자동 괄호 닫힘
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/nerdtree'
Plugin 'airblade/vim-gitgutter'
Plugin 'scrooloose/syntastic' " 문법검사 ******** 이게 검사 플러그인 입니다.
Plugin 'ctrlpvim/ctrlp.vim'
call vundle#end() " required
" end of Vundle -------------------------------------

" vim 기본 설정 영역
filetype plugin indent on

"NERDTree ON 단축키를 "\nt"로 설정
map nt :NERDTree
let NERDTreeShowHidden=1
" let NERDTreeQuitOnOpen=1
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|vendor$',
\ 'file': '\v\.(exe|so|dll)$'
\ }

" colorscheme jellybeans " 컬러 스킴 설정.(plugin 설치 필요)

filetype on "vim filetype on
"Source Explorer 환경설정
nmap :SrcExplToggle "F8 Key = SrcExpl Toggling
nmap h "왼쪽 창으로 이동
nmap j "아래 창으로 이동
nmap k "윗 창으로 이동
nmap l "오른쪽 창으로 이동

" Syntax 지원
if has("syntax")
syntax on
endif

set backspace=indent,eol,start " 맥 vi 백스페이스

set encoding=utf-8 " encoding 설정
set fileencodings=utf-8,cp949,default,latin1
set termencoding=utf-8

" set printencoding=utf-8 " 인쇄 encoding 옵션
" set printmbcharset=ISO10646
" set printmbfont=r:NanumGothiccoding,c:yes,a:yes
set number " 좌측 라인 넘버 표시
set numberwidth=6 " 넘버 표시 공간의 너비

set title " 하단 편집 문서의 이름 표시
set ruler " 하단부에 현재 커서의 위치를 표시

set shiftwidth=4 " 들여쓰기 간격
set tabstop=4 " tab 간격

set cindent
set autoindent " 자동 들여쓰기
set smartindent

set hlsearch " 검색 결과 강조
set incsearch " 증가 방향으로 검색
set nowrapscan " 검색 시 파일 끝에서 되돌려 검색하지 않게
set ignorecase " 검색 시 대소문자 구분하지 않음

set nowrap " 자동 줄 바꿈 사용하지 않음

set autowrite " 자동 저장
set autoread

" set paste " 붙여 넣기 시 계단현상 방지
set showmatch " 커서 위치 시 괄호의 끝 혹은 시작을 반전으로 표시

" for vim-airline
let g:airline#extensions#tabline#enabled = 1 " turn on buffer list
let g:airline_theme='hybrid'
set laststatus=2 " turn on bottom bar

set tagbsearch " 태그 데이터 베이스를 이진으로 검사

익명 사용자의 이미지

duty7351의 이미지

이건 생각 못했네요.. 정말 감사합니다! 다음 부터는 꼼꼼히 확인하겠습니다!

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.